xzdiff.in | xzdiff.in | |||
---|---|---|---|---|
skipping to change at line 139 | skipping to change at line 139 | |||
cmp_status=$? | cmp_status=$? | |||
case $xz_status in | case $xz_status in | |||
*[1-9]*) xz_status=1;; | *[1-9]*) xz_status=1;; | |||
*) xz_status=0;; | *) xz_status=0;; | |||
esac | esac | |||
(exit $cmp_status) | (exit $cmp_status) | |||
else | else | |||
F=`expr "/$2" : '.*/\(.*\)[-.][ablmotxz2]*$'` || F=$prog | F=`expr "/$2" : '.*/\(.*\)[-.][ablmotxz2]*$'` || F=$prog | |||
tmp= | tmp= | |||
trap ' | trap ' | |||
test -n "$tmp" && rm -f "$tmp" | test -n "$tmp" && rm -rf "$tmp" | |||
(exit 2); exit 2 | (exit 2); exit 2 | |||
' HUP INT PIPE TERM 0 | ' HUP INT PIPE TERM 0 | |||
tmp=`mktemp -t -- "$F.XXXXXX"` || exit 2 | if type mktemp >/dev/null 2>&1; then | |||
$xz2 -cdfq -- "$2" > "$tmp" || exit 2 | tmp=`mktemp -t -d -- "$prog.XXXXXXXXXX"` || exit 2 | |||
else | ||||
# Fallback code if mktemp is missing. This isn't as | ||||
# robust as using mktemp since this doesn't try with | ||||
# different file names in case of a file name conflict. | ||||
# | ||||
# There's no need to save the original umask since | ||||
# we don't create any non-temp files. Note that using | ||||
# mkdir -m 0077 isn't secure since some mkdir implementations | ||||
# create the dir with the default umask and chmod the | ||||
# the dir afterwards. | ||||
umask 0077 | ||||
mkdir -- "${TMPDIR-/tmp}/$prog.$$" || exit 2 | ||||
tmp="${TMPDIR-/tmp}/$prog.$$" | ||||
fi | ||||
$xz2 -cdfq -- "$2" > "$tmp/$F" || exit 2 | ||||
xz_status=$( | xz_status=$( | |||
exec 4>&1 | exec 4>&1 | |||
($xz1 -cdfq -- "$1" 4>&-; echo $? >&4) 3>&- | | ($xz1 -cdfq -- "$1" 4>&-; echo $? >&4) 3>&- | | |||
eval "$cmp" - '"$tmp"' >&3 | eval "$cmp" - '"$tmp/$F"' >&3 | |||
) | ) | |||
cmp_status=$? | cmp_status=$? | |||
rm -f "$tmp" || xz_status=$? | rm -rf "$tmp" || xz_status=$? | |||
trap - HUP INT PIPE TERM 0 | trap - HUP INT PIPE TERM 0 | |||
(exit $cmp_status) | (exit $cmp_status) | |||
fi;; | fi;; | |||
*) | *) | |||
xz_status=$( | xz_status=$( | |||
exec 4>&1 | exec 4>&1 | |||
($xz1 -cdfq -- "$1" 4>&-; echo $? >&4) 3>&- | | ($xz1 -cdfq -- "$1" 4>&-; echo $? >&4) 3>&- | | |||
eval "$cmp" - '"$2"' >&3 | eval "$cmp" - '"$2"' >&3 | |||
);; | );; | |||
esac;; | esac;; | |||
End of changes. 4 change blocks. | ||||
5 lines changed or deleted | 20 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |