[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Patch] Fix old 'tail +' syntax in gzexe.in
From: |
Matthew Burgess |
Subject: |
[Patch] Fix old 'tail +' syntax in gzexe.in |
Date: |
Sun, 26 Nov 2006 19:58:45 +0000 |
User-agent: |
Thunderbird 1.5.0.8 (X11/20061117) |
Hi Paul,
The ChangeLog mentions 'Don't assume "tail +22" works; POSIX removed this.'.
A simple grep shows the following two occurrences of the old syntax
still exist though:
gzexe.in:if tail +$skip "$0" | "BINDIR"/gzip -cd > "$gztmp"; then
gzexe.in: if $tail +$skip "$i" | gzip -cd > $tmp; then
The attached patch fixes that, and also changes the first instance to
call $tail rather than the hard coded 'tail'.
Regards,
Matt.
diff -Naur gzip-1.3.6.orig/gzexe.in gzip-1.3.6/gzexe.in
--- gzip-1.3.6.orig/gzexe.in 2006-11-20 08:40:33.000000000 +0000
+++ gzip-1.3.6/gzexe.in 2006-11-26 19:55:08.000000000 +0000
@@ -139,7 +139,7 @@
then gztmp=`tempfile -p gztmp` || exit
else gztmp=/tmp/gztmp$$
fi
-if tail +$skip "$0" | "BINDIR"/gzip -cd > "$gztmp"; then
+if $tail -n +$skip "$0" | "BINDIR"/gzip -cd > "$gztmp"; then
umask $umask
/bin/chmod 700 "$gztmp"
prog=`echo "$gztmp" | /bin/sed 's|[^/]*$||'; echo $0 | /bin/sed 's|.*/||'`
@@ -169,7 +169,7 @@
if sed -e 1d -e 2q "$i" | grep "^skip=[0-9][0-9]*$" >/dev/null; then
eval `sed -e 1d -e 2q "$i"`
fi
- if $tail +$skip "$i" | gzip -cd > $tmp; then
+ if $tail -n +$skip "$i" | gzip -cd > $tmp; then
:
else
echo ${x}: $i probably not in gzexe format, file unchanged.
- [Patch] Fix old 'tail +' syntax in gzexe.in,
Matthew Burgess <=