termux-packages/packages/libbz2/fix-paths.patch

22 lines
756 B
Diff
Raw Normal View History

diff -uNr bzip2-1.0.6/bzdiff bzip2-1.0.6.mod/bzdiff
--- bzip2-1.0.6/bzdiff 2007-01-03 04:00:55.000000000 +0200
+++ bzip2-1.0.6.mod/bzdiff 2019-03-01 20:44:12.401418675 +0200
@@ -37,7 +37,7 @@
echo "Usage: $prog [${comp}_options] file [file]"
exit 1
fi
-tmp=`mktemp ${TMPDIR:-/tmp}/bzdiff.XXXXXXXXXX` || {
+tmp=`mktemp ${TMPDIR:-@TERMUX_PREFIX@/tmp}/bzdiff.XXXXXXXXXX` || {
echo 'cannot create a temporary file' >&2
exit 1
}
@@ -56,7 +56,7 @@
bzip2 -cdfq "$2" > $tmp
bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp
STAT="$?"
- /bin/rm -f $tmp;;
+ rm -f $tmp;;
*) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
STAT="$?";;