summaryrefslogtreecommitdiff
path: root/debian/scripts/file2cat
diff options
context:
space:
mode:
authorMartin Schulze <joey@infodrom.org>2004-09-13 09:07:18 +0200
committerAndreas Beckmann <debian@abeckmann.de>2012-10-01 19:58:43 +0200
commitae03fe5d926a63cab418207f760d62a947957123 (patch)
treeaa48cfe56ac7c47fb9b0abce4d4689033d3098d6 /debian/scripts/file2cat
parentdd994db23cb7f88732be927fad3a7039bd6301db (diff)
downloadsendmail-debian/8.12.3-7.1.tar.gz
Imported Debian patch 8.12.3-7.1debian/8.12.3-7.1
Diffstat (limited to 'debian/scripts/file2cat')
-rw-r--r--debian/scripts/file2cat13
1 files changed, 13 insertions, 0 deletions
diff --git a/debian/scripts/file2cat b/debian/scripts/file2cat
new file mode 100644
index 0000000..d95d77e
--- /dev/null
+++ b/debian/scripts/file2cat
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ "$1" = "" ]; then
+ echo "Usage: file2cat <file>"
+ exit 1
+fi
+
+case "$1" in
+ *.gz|*.Z|*.tgz) cmd=zcat;;
+ *.bz|*.bz2) cmd=bzcat;;
+ *) cmd=cat;;
+esac
+$cmd $1