recoll/src/filters/rcluncomp
2005-02-04 14:21:18 +00:00

25 lines
582 B
Bash
Executable File

#!/bin/sh
# @(#$Id: rcluncomp,v 1.1 2005-02-04 14:21:17 dockes Exp $ (C) 2004 J.F.Dockes
# Uncompress file using any program like gunzip/bunzip2. We jump through
# hoops to let the decompressor remove the compression suffix in the file
# name. The input directory must be empty on entry.
if test $# != 3 -o ! -f $2 -o ! -d $3 ; then
echo "Usage: rcluncomp <ucomp_prog> <infile> <outdir>"
exit 1
fi
uncomp=$1
infile=$2
outdir=$3
sinfile=`basename $infile`
cp $infile $outdir/$sinfile || exit 1
$uncomp $outdir/$sinfile
uncompressed=`echo $outdir/*`
echo $uncompressed