source: patches/bzip2-1.0.3-remove_tempfile-1.patch@ 0c3999a

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 0c3999a 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
  • bzip2-1.0.3/bzdiff

    Submitted By: Jim Gifford (patches at jg555 dot com)
    Date: 2006-02-19
    Initial Package Version: 1.0.3
    Origin: Jim Gifford
    Upstream Status: Sent
    Description: Removes Dependency of tempfile
     
    old new  
    3737        echo "Usage: $prog [${comp}_options] file [file]"
    3838        exit 1
    3939fi
    40 tmp=`tempfile -d /tmp -p bz` || {
    41       echo 'cannot create a temporary file' >&2
    42       exit 1
    43 }
    4440set $FILES
    4541if test $# -eq 1; then
    4642        FILE=`echo "$1" | sed 's/.bz2$//'`
     
    5349                case "$2" in
    5450                *.bz2)
    5551                        F=`echo "$2" | sed 's|.*/||;s|.bz2$||'`
    56                         bzip2 -cdfq "$2" > $tmp
    57                         bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp
     52                        bzip2 -cdfq "$2"  > /tmp/"$F".$$
     53                        bzip2 -cdfq "$1" | $comp $OPTIONS - /tmp/"$F".$$ | sed -e "s|Files - and /tmp/"$F".$$|Files $1 and $2|g"
    5854                        STAT="$?"
    59                         /bin/rm -f $tmp;;
     55                        /bin/rm -f /tmp/"$F".$$;;
    6056
    61                 *)      bzip2 -cdfq "$1" | $comp $OPTIONS - "$2"
     57                *)      bzip2 -cdfq "$1" | $comp $OPTIONS - "$2" | sed -e "s|Files - and /tmp/"$F".$$|Files $1 and $2|g"
    6258                        STAT="$?";;
    6359                esac;;
    6460        *)      case "$2" in
    6561                *.bz2)
    6662                        bzip2 -cdfq "$2" | $comp $OPTIONS "$1" -
    6763                        STAT="$?";;
    68                 *)      $comp $OPTIONS "$1" "$2"
     64                *)      $comp $OPTIONS "$1" "$2" | sed -e "s|Files - and /tmp/"$F".$$|Files $1 and $2|g"
     65
    6966                        STAT="$?";;
    7067                esac;;
    7168        esac
Note: See TracBrowser for help on using the repository browser.