| OLD | NEW |
| 1 #!@POSIX_SHELL@ | 1 #!@POSIX_SHELL@ |
| 2 | 2 |
| 3 # Copyright (C) 1998, 2002, 2006, 2007 Free Software Foundation | 3 # Copyright (C) 1998, 2002, 2006, 2007 Free Software Foundation |
| 4 # Copyright (C) 1993 Jean-loup Gailly | 4 # Copyright (C) 1993 Jean-loup Gailly |
| 5 | 5 |
| 6 # Modified for XZ Utils by Andrew Dudman and Lasse Collin. | 6 # Modified for XZ Utils by Andrew Dudman and Lasse Collin. |
| 7 | 7 |
| 8 # This program is free software; you can redistribute it and/or modify | 8 # This program is free software; you can redistribute it and/or modify |
| 9 # it under the terms of the GNU General Public License as published by | 9 # it under the terms of the GNU General Public License as published by |
| 10 # the Free Software Foundation; either version 2 of the License, or | 10 # the Free Software Foundation; either version 2 of the License, or |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 eval "$cmp" - - >&3 | 113 eval "$cmp" - - >&3 |
| 114 ) | 114 ) |
| 115 elif # Reject Solaris 8's buggy /bin/bash 2.03. | 115 elif # Reject Solaris 8's buggy /bin/bash 2.03. |
| 116 echo X | (echo X | eval "$cmp" /dev/fd/5 - >/dev/null 2>&1) 5<&0;
then | 116 echo X | (echo X | eval "$cmp" /dev/fd/5 - >/dev/null 2>&1) 5<&0;
then |
| 117 xz_status=$( | 117 xz_status=$( |
| 118 exec 4>&1 | 118 exec 4>&1 |
| 119 ($xz1 -cdfq -- "$1" 4>&-; echo $? >&4) 3>&- | | 119 ($xz1 -cdfq -- "$1" 4>&-; echo $? >&4) 3>&- | |
| 120 ( ($xz2 -cdfq -- "$2" 4>&-; echo $? >&4) 3>&- 5<&- </dev/null | | 120 ( ($xz2 -cdfq -- "$2" 4>&-; echo $? >&4) 3>&- 5<&- </dev/null | |
| 121 eval "$cmp" /dev/fd/5 - >&3) 5<&0 | 121 eval "$cmp" /dev/fd/5 - >&3) 5<&0 |
| 122 ) | 122 ) |
| 123 cmp_status=$? |
| 123 case $xz_status in | 124 case $xz_status in |
| 124 *[1-9]*) xz_status=1;; | 125 *[1-9]*) xz_status=1;; |
| 125 *) xz_status=0;; | 126 *) xz_status=0;; |
| 126 esac | 127 esac |
| 128 (exit $cmp_status) |
| 127 else | 129 else |
| 128 F=`expr "/$2" : '.*/\(.*\)[-.][ablmtxz2]*$'` || F=$prog | 130 F=`expr "/$2" : '.*/\(.*\)[-.][ablmtxz2]*$'` || F=$prog |
| 129 tmp= | 131 tmp= |
| 130 trap ' | 132 trap ' |
| 131 test -n "$tmp" && rm -f "$tmp" | 133 test -n "$tmp" && rm -f "$tmp" |
| 132 (exit 2); exit 2 | 134 (exit 2); exit 2 |
| 133 ' HUP INT PIPE TERM 0 | 135 ' HUP INT PIPE TERM 0 |
| 134 tmp=`mktemp -t -- "$F.XXXXXX"` || exit 2 | 136 tmp=`mktemp -t -- "$F.XXXXXX"` || exit 2 |
| 135 $xz2 -cdfq -- "$2" > "$tmp" || exit 2 | 137 $xz2 -cdfq -- "$2" > "$tmp" || exit 2 |
| 136 xz_status=$( | 138 xz_status=$( |
| (...skipping 26 matching lines...) Expand all Loading... |
| 163 esac;; | 165 esac;; |
| 164 esac | 166 esac |
| 165 else | 167 else |
| 166 echo >&2 "$0: Invalid number of operands; try \`${0##*/} --help' for help" | 168 echo >&2 "$0: Invalid number of operands; try \`${0##*/} --help' for help" |
| 167 exit 2 | 169 exit 2 |
| 168 fi | 170 fi |
| 169 | 171 |
| 170 cmp_status=$? | 172 cmp_status=$? |
| 171 test "$xz_status" -eq 0 || exit 2 | 173 test "$xz_status" -eq 0 || exit 2 |
| 172 exit $cmp_status | 174 exit $cmp_status |
| OLD | NEW |