Imported Upstream version 1.4
[debian/gzip] / zcat.in
1 #!/bin/sh
2 # Uncompress files to standard output.
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="zcat (gzip) @VERSION@
27 Copyright (C) 2007, 2009-2010 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]... [FILE]...
35 Uncompress FILEs to standard output.
36
37   -f, --force       force; read compressed data even from a terminal
38   -l, --list        list compressed file contents
39   -q, --quiet       suppress all warnings
40   -r, --recursive   operate recursively on directories
41   -S, --suffix=SUF  use suffix SUF on compressed files
42   -t, --test        test compressed file integrity
43   -v, --verbose     verbose mode
44       --help        display this help and exit
45       --version     display version information and exit
46
47 With no FILE, or when FILE is -, read standard input.
48
49 Report bugs to <bug-gzip@gnu.org>."
50
51 case $1 in
52 --help)    exec echo "$usage";;
53 --version) exec echo "$version";;
54 esac
55
56 exec gzip -cd "$@"