Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: b596092f27
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (28 sloc) 0.631 kb
#!/bin/sh
# Makes a patch by shar'ing up a directory (given as an argument) and prefixing
# patch-hdr to an output file (given as the second argument)
PATCHDIR=$1
OUTPUT=$2
INSTALL=$PATCHDIR/install.sh
usage(){
echo Usage:
echo "$0 <dirname> <output>-- where <dirname> contains an install.sh file"
exit 1
}
if [ -z "$OUTPUT" ]
then
echo Need an output filename
usage
fi
if [ -e $INSTALL ]
then
SHARNAME=patch.$$
trap 'rm -f $SHARNAME; exit 1' HUP INT QUIT TERM
echo Writing to $SHARNAME
(cd $PATCHDIR; shar *) > $SHARNAME
cat patch-hdr $SHARNAME > $OUTPUT
rm $SHARNAME
echo Done
else
usage
fi
Jump to Line
Something went wrong with that request. Please try again.