2 # $NetBSD: ckscripts.sh,v 1.9 1995/04/23 10:07:34 cgd Exp $
4 # This script runs the .ed scripts generated by mkscripts.sh
5 # and compares their output against the .r files, which contain
8 PATH
="/bin:/usr/bin:/usr/local/bin/:."
10 [ ! -x $ED ] && { echo "$ED: cannot execute"; exit 1; }
12 # Run the *.red scripts first, since these don't generate output;
13 # they exit with non-zero status
17 echo "*** The script $i exited abnormally ***"
21 # Run the remainding scripts; they exit with zero status
23 # base=`expr $i : '\([^.]*\)'`
24 # base=`echo $i | sed 's/\..*//'`
25 base
=`$ED - \!"echo $i" <<-EOF
29 if cmp -s $base.o
$base.r
; then :; else
30 echo "*** Output $base.o of script $i is incorrect ***"
33 echo "*** The script $i exited abnormally ***"
37 grep -h '\*\*\*' errs.o scripts.o