summaryrefslogtreecommitdiff
path: root/src/compress-dummy.in
blob: 4421e8d151e7c72f5a00fdf8fa68a96e552f8d77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#! @SH@
# compress dummy script for uncompressing legacy shar files.
# Copyright (C) 2002, 2006 Free Software Foundation, Inc.
# Karl Eichwalder <ke@suse.de>, 2002.

package="@PACKAGE@"
version="@VERSION@"

progname=`echo $0 | sed -e 's,.*/,,'`

usage="\
Usage: $progname OPTION FILE
Replacement script for uncompressing legacy shar files.

with OPTION in:
      --help      display this help and exit
      --version   output version information and exit

  -d              uncompress

Use \`gzip' for compressing files."

while test $# -gt 0; do
  case $1 in
    -d) mode=$1; shift ;;
#    -x) trace=-x; set -x; shift ;;
    --v* ) echo "$progname - $package $version"; exit 0 ;;
    --h* ) echo "$usage"; exit 0 ;;
    -) break ;;
    -*) echo "Try \`$progname --help' for more information."; exit 1 ;;
    *) break
  esac
done

if test -z "$mode"; then
  exec 1>&2
  cat <<_EOF_
This is not compress.
This is a replacement script that invokes \`gzip -d' for uncompressing
files compressed with the compress program.
Try \`$progname --help' for more information.
_EOF_
  exit 1
fi

gzip -d

exit $?

# compress-dummy.in ends here