Really sync with bzip1.0.8.
The previous git update seems to have gone horribly wrong. Try to dig
ourselves out of that hole (at least temporarily; the next merge might
be painful too?) by unpacking the current release tarball and checking
in the difference.
As a double-check, `git diff bzip2-1.0.8` looks good after this change,
only showing expected changes like "there's an Android.bp file here that
isn't upstream".
Bug: http://b/179636234
Test: treehugger
Change-Id: Ia9612913e319a1cfa29f0c370f0a3775d8ecb496
diff --git a/bzdiff b/bzdiff
old mode 100644
new mode 100755
index 6fc38f9..bd96c27
--- a/bzdiff
+++ b/bzdiff
@@ -37,10 +37,6 @@
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 @@
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 @@
STAT="$?";;
esac;;
esac
- exit "$STAT"
else
echo "Usage: $prog [${comp}_options] file [file]"
exit 1
fi
+exit "$STAT"