Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37039329
en ru br
Репозитории ALT
S:1.13-alt2
5.1: 1.3.5-alt6
4.1: 1.3.5-alt4.M40.1
4.0: 1.3.5-alt4.M40.1
3.0: 1.3.5-alt2
+updates:1.3.5-alt2.M30.1
www.altlinux.org/Changes

Другие репозитории
Upstream:1.3.12

Группа :: Архивирование/Сжатие
Пакет: gzip

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: gzip-1.3.5-alt-basename.patch
Скачать


diff -upk.orig gzip-1.3.5.orig/gzexe.in gzip-1.3.5/gzexe.in
--- gzip-1.3.5.orig/gzexe.in	2002-09-28 06:18:11 +0000
+++ gzip-1.3.5/gzexe.in	2005-05-19 13:57:33 +0000
@@ -34,7 +34,7 @@
 
 
 PATH="BINDIR:$PATH"
-x=`basename $0`
+x="${0##*/}"
 if test $# = 0; then
   echo compress executables. original file foo is renamed to foo~
   echo usage: ${x} [-d] files...
@@ -98,7 +98,7 @@ for i do
     echo "${x}: $i has setgid permission, unchanged"
     continue
   fi
-  case "`basename $i`" in
+  case "${i##*/}" in
   gzip | tail | sed | chmod | ln | sleep | rm)
 	echo "${x}: $i would depend on itself"; continue ;;
   esac
@@ -121,7 +121,7 @@ umask 77
 if tail +$skip "$0" | "BINDIR"/gzip -cd > /tmp/gztmp$$; then
   umask $umask
   /bin/chmod 700 /tmp/gztmp$$
-  prog="`echo $0 | /bin/sed 's|^.*/||'`"
+  prog="${0##*/}"
   if /bin/ln /tmp/gztmp$$ "/tmp/$prog" 2>/dev/null; then
     trap '/bin/rm -f /tmp/gztmp$$ "/tmp/$prog"; exit $res' 0
     (/bin/sleep 5; /bin/rm -f /tmp/gztmp$$ "/tmp/$prog") 2>/dev/null &
diff -upk.orig gzip-1.3.5.orig/zdiff.in gzip-1.3.5/zdiff.in
--- gzip-1.3.5.orig/zdiff.in	2002-09-26 08:33:24 +0000
+++ gzip-1.3.5/zdiff.in	2005-05-19 13:49:53 +0000
@@ -11,7 +11,7 @@
 # or diff is preserved.
 
 PATH="BINDIR:$PATH"; export PATH
-prog=`echo $0 | sed 's|.*/||'`
+prog="${0##*/}"
 case "$prog" in
   *cmp) comp=${CMP-cmp}   ;;
   *)    comp=${DIFF-diff} ;;
diff -upk.orig gzip-1.3.5.orig/zforce.in gzip-1.3.5/zforce.in
--- gzip-1.3.5.orig/zforce.in	2002-09-29 06:01:53 +0000
+++ gzip-1.3.5/zforce.in	2005-05-19 13:52:14 +0000
@@ -27,7 +27,7 @@
 
 
 PATH="BINDIR:$PATH"; export PATH
-x=`basename $0`
+x="${0##*/}"
 if test $# = 0; then
   echo "force a '.gz' extension on all gzip files"
   echo usage: $x files...
diff -upk.orig gzip-1.3.5.orig/zgrep.in gzip-1.3.5/zgrep.in
--- gzip-1.3.5.orig/zgrep.in	2002-09-28 05:53:14 +0000
+++ gzip-1.3.5/zgrep.in	2005-05-19 13:52:05 +0000
@@ -24,7 +24,7 @@
 
 PATH="BINDIR:$PATH"; export PATH
 
-prog=`echo $0 | sed 's|.*/||'`
+prog="${0##*/}"
 case "$prog" in
 	*egrep)	grep=${EGREP-egrep}	;;
 	*fgrep)	grep=${FGREP-fgrep}	;;
@@ -40,7 +40,7 @@ with_filename=0
 
 while test $# -ne 0; do
   case "$after_dash_dash$1" in
-  --d* | --rec*)	echo >&2 "$0: $1: option not supported"; exit 2;;
+  --d* | --rec*)	echo >&2 "$prog: $1: option not supported"; exit 2;;
   --files-with-*)	files_with_matches=1;;
   --files-witho*)	files_without_matches=1;;
   --no-f*)	no_filename=1;;
@@ -48,7 +48,7 @@ while test $# -ne 0; do
   --*)	;;
   -*)
 	case "$1" in
-	-*[dr]*) echo >&2 "$0: $1: option not supported"; exit 2;;
+	-*[dr]*) echo >&2 "$prog: $1: option not supported"; exit 2;;
 	esac
 	case "$1" in
 	-*H*)	with_filename=1;;
diff -upk.orig gzip-1.3.5.orig/zmore.in gzip-1.3.5/zmore.in
--- gzip-1.3.5.orig/zmore.in	2002-09-28 08:19:37 +0000
+++ gzip-1.3.5/zmore.in	2005-05-19 13:54:11 +0000
@@ -41,7 +41,7 @@ fi
 
 if test $# = 0; then
     if test -t 0; then
-	echo usage: ${ZMORE_PROGRAM_NAME-zmore} files...
+	echo usage: ${0##*/} files...
     else
 	gzip -cdfq | eval ${PAGER-more}
     fi
diff -upk.orig gzip-1.3.5.orig/znew.in gzip-1.3.5/znew.in
--- gzip-1.3.5.orig/znew.in	2002-09-27 06:17:09 +0000
+++ gzip-1.3.5/znew.in	2005-05-19 13:49:17 +0000
@@ -52,7 +52,7 @@ done
 
 if test $# -eq 0; then
   echo "recompress .Z files into $ext (gzip) files"
-  echo usage: `echo $0 | sed 's,^.*/,,'` "[-tv9KP]" file.Z...
+  echo usage: ${0##*/} "[-tv9KP]" file.Z...
   echo "  -t tests the new files before deleting originals"
   echo "  -v be verbose"
   echo "  -9 use the slowest compression method (optimal compression)"
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin