about summary refs log tree commit diff
path: root/pkgs/tools/misc/autorevision
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2017-02-07 17:12:05 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2017-02-07 17:12:25 +0100
commit8dd90abc1763a50bcb2372468e1bb6f074433077 (patch)
tree0e94840cd5d26a33ba099d337107c41cb77f6da4 /pkgs/tools/misc/autorevision
parent4853900dd3cf1908e92a6287a500368ed4752ef1 (diff)
downloadnixlib-8dd90abc1763a50bcb2372468e1bb6f074433077.tar
nixlib-8dd90abc1763a50bcb2372468e1bb6f074433077.tar.gz
nixlib-8dd90abc1763a50bcb2372468e1bb6f074433077.tar.bz2
nixlib-8dd90abc1763a50bcb2372468e1bb6f074433077.tar.lz
nixlib-8dd90abc1763a50bcb2372468e1bb6f074433077.tar.xz
nixlib-8dd90abc1763a50bcb2372468e1bb6f074433077.tar.zst
nixlib-8dd90abc1763a50bcb2372468e1bb6f074433077.zip
autorevision: use sed word delimiters for better precision
Fixes wrongly replaced 'cat' in help text:

$ autorevision -h
usage: autorevision {-t output-type | -s symbol} [-o cache-file [-f] ] [-e name] [-U] [-V]
	Options include:
	-t output-type		= specify output type
	-s symbol		= specify symbol output
	-o cache-file		= specify cache file lo/nix/store/1rzzq2wdn5vfgbp5y9613jpdkf8i9ag6-coreutils-8.26/bin/cation
...

(Also replace all occurences per line, in case that should occur.)
Diffstat (limited to 'pkgs/tools/misc/autorevision')
-rw-r--r--pkgs/tools/misc/autorevision/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/tools/misc/autorevision/default.nix b/pkgs/tools/misc/autorevision/default.nix
index 19880efd5450..02caf6e33f99 100644
--- a/pkgs/tools/misc/autorevision/default.nix
+++ b/pkgs/tools/misc/autorevision/default.nix
@@ -18,11 +18,11 @@ stdenv.mkDerivation rec {
   installFlags = [ "prefix=$(out)" ];
 
   postInstall = ''
-    sed -e "s|cmp|${diffutils}/bin/cmp|" \
-        -e "s|cat|${coreutils}/bin/cat|" \
-        -e "s|grep|${gnugrep}/bin/grep|" \
-        -e "s|\<sed\>|${gnused}/bin/sed|" \
-        -e "s|\<tee\>|${coreutils}/bin/tee|" \
+    sed -e "s|\<cmp\>|${diffutils}/bin/cmp|g" \
+        -e "s|\<cat\>|${coreutils}/bin/cat|g" \
+        -e "s|\<grep\>|${gnugrep}/bin/grep|g" \
+        -e "s|\<sed\>|${gnused}/bin/sed|g" \
+        -e "s|\<tee\>|${coreutils}/bin/tee|g" \
         -i "$out/bin/autorevision"
   '';