Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37868539
en ru br
ALT Linux repositórios
S:1.0.8-alt2
5.0: 1.0.5-alt3
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

Group :: Arquivamento/Compressão
RPM: bzip2

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: bzip2-1.0.6-owl-bzdiff-tmp.patch
Download


--- bzip2/bzdiff
+++ bzip2/bzdiff
@@ -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="$?";;
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009