Pull down 1.2.2.1: "Figure out output if not given."
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4570 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,23 +1,29 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
if [ "$#" -ne 2 ]; then
|
if [ "$#" -lt 1 -o "$#" -gt 2 ]; then
|
||||||
echo "Usage: `basename $0` proto-file output"
|
echo "Usage: `basename $0` proto-file [output]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if rm -f "$2" ; then :; else
|
infile="$1"
|
||||||
echo "Failed to remove $2"
|
outfile="$2"
|
||||||
|
if [ "$outfile" = "" ]; then
|
||||||
|
outfile=`basename "$infile" .in`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if rm -f "$outfile" ; then :; else
|
||||||
|
echo "Failed to remove $outfile"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
d=`dirname $0`
|
d=`dirname $0`
|
||||||
|
|
||||||
for i in `cat "$1"`; do
|
for i in `cat "$infile"`; do
|
||||||
if [ -f "$i" ]; then
|
if [ -f "$i" ]; then
|
||||||
cat "$i" >> "$2"
|
cat "$i" >> "$outfile"
|
||||||
elif [ -f "$d/$i" ]; then
|
elif [ -f "$d/$i" ]; then
|
||||||
cat "$d/$i" >> "$2"
|
cat "$d/$i" >> "$outfile"
|
||||||
else
|
else
|
||||||
echo "$i: File not found"
|
echo "$i: File not found"
|
||||||
exit 1
|
exit 1
|
||||||
|
Reference in New Issue
Block a user