81 lines
1.7 KiB
Bash
81 lines
1.7 KiB
Bash
#!/bin/bash -
|
|
#
|
|
# This shell script will run make and create trace.txt
|
|
# cmd: r.sh [ -f|x(format) f=fixed x=open filename(s)]
|
|
# David Essex August 1999
|
|
#
|
|
e0a="invalid number of parms..."
|
|
e0b="invalid option(s) "
|
|
e0c="This shell script will run make and create trace.txt"
|
|
e0d="cmd: r.sh [ -f|x(format) f=fixed x=open filename(s)]"
|
|
#
|
|
p_print1 ()
|
|
{
|
|
for arg in "$@"
|
|
do
|
|
echo $arg >&2
|
|
done
|
|
}
|
|
#
|
|
TESTLIB=../copybooks
|
|
export TESTLIB
|
|
#
|
|
prglst_f='ft1 ft2 ft3'
|
|
prglst_x='t1 t2 t3'
|
|
prg=''
|
|
#
|
|
p_main ()
|
|
{
|
|
ftype=$1
|
|
shift
|
|
for prg in "$@"
|
|
do
|
|
if [ \( ! -f "$prg.cob" \) -o \( ! -r "$prg.cob" \) ]
|
|
then
|
|
e1="error: filename $prg.cob not found or not readable... skipping file"
|
|
p_print1 "$e1"
|
|
else
|
|
echo "processing $prg.cob ... "
|
|
# p_print1 "$e1"
|
|
# cp1=`cat w/copypathlen_1290.txt`
|
|
# pp=/usr/local/share/htcobol/htcobolpp-0.54
|
|
# pp=/usr/local/share/htcobol/htcobolpp-0.55
|
|
pp=../htcobolpp
|
|
# pp=../htcobolpp.0
|
|
# e2="$pp -v -g -d -t 8 -I$cp1 -I.:../copybooks $ftype $prg.cob -o $prg-1.cob -p $prg.cob.txt "
|
|
# e2="$pp -v -d -t 8 -I$cp1 -I.:../copybooks $ftype $prg.cob -o $prg-1.cob -p $prg.cob.txt "
|
|
e2="$pp -v -g -d -t 8 -I.:../copybooks $ftype $prg.cob -o $prg-1.cob -p $prg.cob.txt "
|
|
# e2="$pp -v -g -t 8 -I.:../copybooks $ftype $prg.cob -o $prg-1.cob -p $prg.cob.txt "
|
|
echo "$e2"
|
|
$e2 2>$prg.run.err.trace.txt | tee -a $prg.run.trace.txt
|
|
echo "(done)"
|
|
fi
|
|
done
|
|
}
|
|
#
|
|
if [ "$#" -eq 0 ]
|
|
then
|
|
make clean
|
|
p_main -f $prglst_f
|
|
p_main -x $prglst_x
|
|
else
|
|
ft=$1
|
|
shift
|
|
#
|
|
case "$ft"
|
|
in
|
|
-f)
|
|
p_main $ft $@
|
|
;;
|
|
-x)
|
|
p_main $ft $@
|
|
;;
|
|
*)
|
|
e1="$e0b$ft ..."
|
|
p_print1 "$e1" "$e0c" "$e0d"
|
|
;;
|
|
esac
|
|
#
|
|
fi
|
|
#
|