aboutsummaryrefslogtreecommitdiff
path: root/bzdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:03:19 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:03:19 +0000
commitd2c0ace3fb4be0707deb91df7211faa69fdc912d (patch)
tree8ac7bdf9fa8af862b2cddad402dbeac22494f49a /bzdiff
parent55e639dd9711f157cea4ad10b66883be57aa56db (diff)
parentaf971b5524a392944a8fd1423b1860f3ab2919ec (diff)
downloadbzip2-android13-mainline-ipsec-release.tar.gz
Change-Id: I214e022e89f6200c694f3ee17ddbffa47b174b42
Diffstat (limited to 'bzdiff')
-rwxr-xr-x[-rw-r--r--]bzdiff16
1 files changed, 8 insertions, 8 deletions
diff --git a/bzdiff b/bzdiff
index 6fc38f9..bd96c27 100644..100755
--- a/bzdiff
+++ b/bzdiff
@@ -37,10 +37,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$//'`
@@ -53,10 +49,14 @@ elif test $# -eq 2; then
case "$2" in
*.bz2)
F=`echo "$2" | sed 's|.*/||;s|.bz2$||'`
- bzip2 -cdfq "$2" > $tmp
- bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp
+ tmp=`mktemp "${TMPDIR:-/tmp}"/bzdiff.XXXXXXXXXX` || {
+ echo 'cannot create a temporary file' >&2
+ exit 1
+ }
+ bzip2 -cdfq "$2" > "$tmp"
+ bzip2 -cdfq "$1" | $comp $OPTIONS - "$tmp"
STAT="$?"
- /bin/rm -f $tmp;;
+ /bin/rm -f "$tmp";;
*) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
STAT="$?";;
@@ -69,8 +69,8 @@ elif test $# -eq 2; then
STAT="$?";;
esac;;
esac
- exit "$STAT"
else
echo "Usage: $prog [${comp}_options] file [file]"
exit 1
fi
+exit "$STAT"