summaryrefslogtreecommitdiff
path: root/znew.in
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-04-04 10:51:24 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2022-04-04 12:00:44 -0700
commit31193bbd13cd2807d8ccaa2ba5b072303d5425e7 (patch)
treec253dff5d25bab13efefecbe4fe622e9b08de85c /znew.in
parenta1b65e3de9e1b74f75c07f0513befa250e66268a (diff)
downloadgzip-31193bbd13cd2807d8ccaa2ba5b072303d5425e7.tar.gz
build: support --program-prefix etc.
Problem reported by Antonio Diaz Diaz via Dagobert Michelsen in: https://bugs.gnu.org/16876 * Makefile.am (.in): Substitute for 'gzip', 'zdiff', 'zgrep'. ($(GZIP_TRANSFORMED), $(ZDIFF_TRANSFORMED), $(ZGREP_TRANSFORMED)): New rules to build forwarding shell scripts, if needed. Add these files to BUILT_SOURCES and MOSTLY_CLEANFILES if needed. * configure.ac (GZIP_TRANSFORMED, ZDIFF_TRANSFORMED, ZGREP_TRANSFORMED): New substituted vars. (GZIP_IS_TRANSFORMED, ZDIFF_IS_TRANSFORMED, ZGREP_IS_TRANSFORMED): New Automake conditions. * gunzip.in, gzexe.in, zcat.in, zcmp.in, zdiff.in, zegrep.in: * zfgrep.in, zforce.in, zgrep.in, zless.in, zmore.in, znew.in: Quote possibly-transformed subcommand names.
Diffstat (limited to 'znew.in')
-rw-r--r--znew.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/znew.in b/znew.in
index 3e994b2..45d0764 100644
--- a/znew.in
+++ b/znew.in
@@ -94,7 +94,7 @@ for i do
fi
test $keep -eq 1 && old=`wc -c < "$n.Z"`
if test $pipe -eq 1; then
- if gzip -d < "$n.Z" | gzip $opt > "$n$ext"; then
+ if 'gzip' -d < "$n.Z" | 'gzip' $opt > "$n$ext"; then
# Copy file attributes from old file to new one, if possible.
touch -r"$n.Z" -- "$n$ext" 2>/dev/null
chmod --reference="$n.Z" -- "$n$ext" 2>/dev/null
@@ -111,14 +111,14 @@ for i do
res=1; continue
fi
fi
- if gzip -d "$n.Z"; then
+ if 'gzip' -d "$n.Z"; then
:
else
test $check -eq 1 && mv "$n.$$" "$n.Z"
printf '%s\n' "error while uncompressing $n.Z"
res=1; continue
fi
- if gzip $opt "$n"; then
+ if 'gzip' $opt "$n"; then
:
else
if test $check -eq 1; then
@@ -142,7 +142,7 @@ for i do
printf '%s\n' "$n.Z smaller than $n$ext -- unchanged"
elif test $check -eq 1; then
- if gzip -t "$n$ext" ; then
+ if 'gzip' -t "$n$ext" ; then
rm -f "$n.$$" "$n.Z"
else
test $pipe -eq 0 && mv "$n.$$" "$n.Z"