source: patches/bzip2-1.0.3-remove_tempfile-1.patch@ 458bb89

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 458bb89 was 69cde8d, checked in by Jim Gifford <clfs@…>, 19 years ago

Added: All patches needed for the book.

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[69cde8d]1Submitted By: Jim Gifford (patches at jg555 dot com)
2Date: 2006-02-19
3Initial Package Version: 1.0.3
4Origin: Jim Gifford
5Upstream Status: Sent
6Description: Removes Dependency of tempfile
7
8--- bzip2-1.0.3/bzdiff.orig 2004-10-09 11:29:42.000000000 +0000
9+++ bzip2-1.0.3/bzdiff 2006-02-20 07:43:08.000000000 +0000
10@@ -37,10 +37,6 @@
11 echo "Usage: $prog [${comp}_options] file [file]"
12 exit 1
13 fi
14-tmp=`tempfile -d /tmp -p bz` || {
15- echo 'cannot create a temporary file' >&2
16- exit 1
17-}
18 set $FILES
19 if test $# -eq 1; then
20 FILE=`echo "$1" | sed 's/.bz2$//'`
21@@ -53,19 +49,20 @@
22 case "$2" in
23 *.bz2)
24 F=`echo "$2" | sed 's|.*/||;s|.bz2$||'`
25- bzip2 -cdfq "$2" > $tmp
26- bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp
27+ bzip2 -cdfq "$2" > /tmp/"$F".$$
28+ bzip2 -cdfq "$1" | $comp $OPTIONS - /tmp/"$F".$$ | sed -e "s|Files - and /tmp/"$F".$$|Files $1 and $2|g"
29 STAT="$?"
30- /bin/rm -f $tmp;;
31+ /bin/rm -f /tmp/"$F".$$;;
32
33- *) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
34+ *) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2" | sed -e "s|Files - and /tmp/"$F".$$|Files $1 and $2|g"
35 STAT="$?";;
36 esac;;
37 *) case "$2" in
38 *.bz2)
39 bzip2 -cdfq "$2" | $comp $OPTIONS "$1" -
40 STAT="$?";;
41- *) $comp $OPTIONS "$1" "$2"
42+ *) $comp $OPTIONS "$1" "$2" | sed -e "s|Files - and /tmp/"$F".$$|Files $1 and $2|g"
43+
44 STAT="$?";;
45 esac;;
46 esac
Note: See TracBrowser for help on using the repository browser.