make it a little bit foolprof

This commit is contained in:
Karsten Keil 1999-10-11 22:12:52 +00:00
parent a2d06bb46f
commit d12d7dab8e
1 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,14 @@
#!/bin/sh
INDENT=`which indent`
SED=`which sed`
if test "$INDENT" = "" ; then
echo programm indent missing
exit
fi
if test "$SED" = "" ; then
echo programm sed missing
exit
fi
BACKUP=false
CHECK=false
case "$1" in
@ -20,8 +30,8 @@ formatiere() {
OUT=$1
fi
cp $1 $1\~
cat $1\~ | indent -kr -i8 -cli8 -psl -lp | \
sed -e 's/^ / /g' \
cat $1\~ | $INDENT -kr -i8 -cli8 -psl -lp | \
$SED -e 's/^ / /g' \
-e 's/^\( \+\) /\1 /g' \
-e 's/^\( \+\) /\1 /g' \
-e 's/^\( \+\) /\1 /g' \