|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T m
Length: 1685 (0x695)
Types: TextFile
Names: »mkscript.out«
└─⟦db229ac7e⟧ Bits:30007240 EUUGD20: SSBA 1.2 / AFW Benchmarks
└─⟦this⟧ »EUUGD20/AFUU-ssba1.21/ssba1.21E/musbus/mkscript.out«
└─⟦this⟧ »EUUGD20/AFUU-ssba1.21/ssba1.21F/musbus/mkscript.out«
#! /bin/sh
# try running a script a catching the output
# $Header: mkscript.out,v 5.2 87/12/09 15:34:15 kenj Exp $
tmp=/tmp/$$
cmdline=`sed 1q script.master | grep '^%W%' | sed 's/%W%[ ]*//'`
if test "$cmdline" = ""
then
echo "mkscript.out: illegal %W% record at beginning of \"script.master\""
exit 1
fi
if make clean context
then
:
else
echo "mkscript.out: \"make clean context\" failed!"
exit 1
fi
if test ! -f script.1
then
echo "mkscript.out: cannot find \"script.1\""
exit 1
fi
# skip the control lines
here=`grep -v '^%' script.master | wc -l | sed 's/ *//'`
# skip the filler text associated with keyb usage
there=`grep -v '^: +[0-9][0-9]*+ ' script.1 | wc -l | sed 's/ *//'`
if test "$here" -ne "$there"
then
echo "mkscript.out: script.master ($here cmds) differs from script.1 ($there cmds)"
exit 1
fi
rm -f script.out
cp script.1 script.out
rm -f sterr.bad
rate=500 tty=/dev/null ; export tty rate
mkdir .tmp
if cp `make manifest` .tmp
then
:
else
echo "mkscript.out: \"cp\" failed!"
rm -rf script.out .tmp ${tmp}*
exit 1
fi
cd .tmp
echo "0" >USER
if $cmdline ../script.1 >>../script.out 2>${tmp}a
then
:
else
cd ..
echo "mkscript.out: fatal error ... see \"script.out.bad\""
mv script.out script.out.bad
cat ${tmp}a >>script.out.bad
rm -rf .tmp ${tmp}*
exit 1
fi
cd ..
if test -f cleanstderr
then
( cat ${tmp}a ; echo "" ) | ./cleanstderr >${tmp}b
else
cp ${tmp}a ${tmp}b
fi
if test -s ${tmp}b
then
echo "mkscript.out: unexpected std error output ..."
sed 's/^/ /' ${tmp}b
mv ${tmp}a stderr.bad
rm -rf script.out .tmp ${tmp}*
exit 1
fi
rm -rf .tmp ${tmp}*