diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2007-05-04 19:53:25 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2007-05-04 19:53:25 +0000 |
commit | 4858351c63f69ea0563bda954c55b875c0c7e7be (patch) | |
tree | b89ac3b1e8e85f41111ca7ea6dc6d95eb7285334 /zcat.in | |
parent | 79c3261c8b9d2ce4cddb488bdee4b087c2e22ee8 (diff) | |
download | gzip-4858351c63f69ea0563bda954c55b875c0c7e7be.tar.gz |
* Makefile.am (.in): Substitute @bindir@, not BINDIR, for
consistency with other substitutions.
(check-local): Use --__bindir . rather than setting GZIP_BINDIR=.,
to allay security concerns voiced by Joerg Lehners in
<http://lists.gnu.org/archive/html/bug-gzip/2007-04/msg00003.html>.
* gunzip.in, gzexe.in, zcat.in, zcmp.in, zdiff.in, zegrep.in, zfgrep.in:
* zforce.in, zgrep.in, zless.in, zmore.in, znew.in:
Support --__bindir rather than GZIP_BINDIR.
* gunzip.in, zcat.in, zcmp.in: Support --help and --version
directly, to avoid some confusion in help and version output.
Problem reported by Eric Blake in
<http://lists.gnu.org/archive/html/bug-gzip/2007-04/msg00006.html>.
Diffstat (limited to 'zcat.in')
-rw-r--r-- | zcat.in | 55 |
1 files changed, 54 insertions, 1 deletions
@@ -1,3 +1,56 @@ #!/bin/sh -PATH=BINDIR:$PATH +# Uncompress files to standard output. + +# Copyright (C) 2007 Free Software Foundation + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +bindir=@bindir@ +case $1 in +--__bindir) bindir=${2?}; shift; shift;; +esac +PATH=$bindir:$PATH + +version="zcat (gzip) @VERSION@ +Copyright (C) 2007 Free Software Foundation, Inc. +This is free software. You may redistribute copies of it under the terms of +the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. +There is NO WARRANTY, to the extent permitted by law. + +Written by Paul Eggert." + +usage="Usage: $0 [OPTION]... [FILE]... +Uncompress FILEs to standard output. + + -f, --force force; read compressed data even from a terminal + -l, --list list compressed file contents + -q, --quiet suppress all warnings + -r, --recursive operate recursively on directories + -S, --suffix=SUF use suffix SUF on compressed files + -t, --test test compressed file integrity + -v, --verbose verbose mode + --help display this help and exit + --version display version information and exit + +With no FILE, or when FILE is -, read standard input. + +Report bugs to <bug-gzip@gnu.org>." + +case $1 in +--help) exec echo "$usage";; +--version) exec echo "$version";; +esac + exec gzip -cd "$@" |