home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- # try running a script a catching the output
- # $Header: mkscript.out,v 1.3 87/06/24 15:13:57 kjmcdonell Beta $
- 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
-
- make clean context
- tty=/dev/null ; export tty
- mkdir .tmp
- cp * .tmp
- cd .tmp
- sed -e 1d -e '/^%%/d' script.master > script.1
- if $cmdline <script.1 >script.out 2>&1
- then
- :
- else
- cat script.out
- echo "mkscript.out: fatal error"
- exit 1
- fi
- cat script.1 >>script.out
- mv script.out ..
- cd ..
- rm -rf .tmp
-