#!/bin/sh
show_header ()
{
echo -n "$1"
if [ "${#1}" -lt 78 ]
then
len=`expr 78 - ${#1}`
for i in `seq 1 $len`
do
echo -n '-'
done
fi
echo
}
show_end ()
{
case x$1 in
x) ;;
*)
case x$verbose in
x) echo ;;
esac
;;
esac
echo "------------------------------------------------------------------------------"
echo ""
}
log_error ()
{
case $# in
0)
while read line
do
echo " $line"
echo " $line" >> /tmp/mkfli4l_error.log
done
;;
*)
echo "$*"
echo "$*" >> /tmp/mkfli4l_error.log
;;
esac
}
append_error ()
{
cat "$1" >> /tmp/mkfli4l_error.log
}
abort ()
{
case "$1" in
'') ;;
-) log_error ;;
*) log_error "$*" ;;
esac
if [ "$dir_build" != "" ]; then
cat <<EOF > "$dir_build/mkfli4l_error.log"
An error occured while creating fli4l-files.
============================================
`cat /tmp/mkfli4l_error.log`
EOF
touch "$dir_build/mkfli4l_error.flg"
cat "$dir_build/mkfli4l_error.log"
echo ""
echo "hit RETURN to continue ..."
read dummy
else
cat <<EOF
An error occured while creating fli4l-files.
============================================
`cat /tmp/mkfli4l_error.log`
EOF
fi
rm -f /tmp/mkfli4l_error.log
cleanup
cleanup_fli4lfiles
exit 1
}
usage ()
{