Imported Upstream version 1.3.14
[debian/gzip] / zcmp.in
1 #!/bin/sh
2 # Compare the uncompressed contents of compressed files, byte by byte.
3
4 # Copyright (C) 2007 Free Software Foundation
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License along
17 # with this program; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20 bindir=@bindir@
21 case $1 in
22 --__bindir) bindir=${2?}; shift; shift;;
23 esac
24 PATH=$bindir:$PATH
25
26 version="zcmp (gzip) @VERSION@
27 Copyright (C) 2007, 2009 Free Software Foundation, Inc.
28 This is free software.  You may redistribute copies of it under the terms of
29 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
30 There is NO WARRANTY, to the extent permitted by law.
31
32 Written by Paul Eggert."
33
34 usage="Usage: $0 [OPTION]... FILE1 [FILE2]
35 Compare FILE1 to FILE2 byte by byte, using their uncompressed contents
36 if they are compressed.  If FILE2 is omitted, compare FILE1 to the
37 uncompressed contents of FILE1.gz.  Do comparisons like 'cmp' does.
38
39 Options are the same as for 'cmp'.
40
41 If a FILE is '-' or missing, read standard input.
42
43 Report bugs to <bug-gzip@gnu.org>."
44
45 case $1 in
46 --help)    exec echo "$usage";;
47 --version) exec echo "$version";;
48 esac
49
50 exec zdiff --__cmp "$@"