Репозиторий Sisyphus
Последнее обновление: 15 октября 2021 | Пакетов: 17364 | Посещений: 22087391
en ru br
Репозитории ALT
S:1.0.8-alt2
5.1: 1.0.6-alt1
4.1: 1.0.6-alt0.M40.1
4.0: 1.0.6-alt0.M40.1
+updates:1.0.5-alt2
3.0: 1.0.3-alt5
www.altlinux.org/Changes

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

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

Патч: bzip2-1.0.4-owl-bzdiff-tmp.patch
Скачать


--- bzip2-1.0.4/bzdiff.orig	2007-01-10 16:00:19 +0000
+++ bzip2-1.0.4/bzdiff	2007-01-10 16:09:48 +0000
@@ -12,7 +12,10 @@
 # necessary) and fed to cmp or diff.  The exit status from cmp
 # or diff is preserved.
 
-PATH="/usr/bin:/bin:$PATH"; export PATH
+[ -z "$PATH" ] &&
+	PATH="/bin:/usr/bin" ||
+	PATH="/bin:/usr/bin:$PATH"
+export PATH
 prog=`echo $0 | sed 's|.*/||'`
 case "$prog" in
   *cmp) comp=${CMP-cmp}   ;;
@@ -37,10 +40,6 @@ if test -z "$FILES"; then
 	echo "Usage: $prog [${comp}_options] file [file]"
 	exit 1
 fi
-tmp=`mktemp ${TMPDIR:-/tmp}/bzdiff.XXXXXXXXXX` || {
-      echo 'cannot create a temporary file' >&2
-      exit 1
-}
 set $FILES
 if test $# -eq 1; then
 	FILE=`echo "$1" | sed 's/.bz2$//'`
@@ -52,11 +51,16 @@ elif test $# -eq 2; then
         *.bz2)
                 case "$2" in
 	        *.bz2)
+			tmp="`mktemp -t bzdiff.XXXXXXXXXX`" || {
+				echo 'cannot create a temporary file' >&2
+				exit 1
+			}
+			trap 'rm -f -- "$tmp"' EXIT
+			trap 'trap - EXIT; rm -f -- "$tmp"; exit 1' HUP INT QUIT PIPE TERM
 			F=`echo "$2" | sed 's|.*/||;s|.bz2$||'`
-                        bzip2 -cdfq "$2" > $tmp
-                        bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp
-                        STAT="$?"
-			/bin/rm -f $tmp;;
+			bzip2 -cdfq "$2" > "$tmp"
+			bzip2 -cdfq "$1" | $comp $OPTIONS - "$tmp"
+			STAT="$?";;
 
                 *)      bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
                         STAT="$?";;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin