#!/bin/sh tool=$0 usage() { echo "" echo "usage: `/bin/basename $tool` -s " echo "" echo ' -s : td(traditonal) for "$build/bin/sam -c $RC -R $ckpt"' echo ' sb(simulate boot) for "$build/bin/simulate -p n2 -s -Dpop= -c $RC -I system.rc"' echo ' sr(simulate restore) for "$build/bin/simulate -Dpop= -R $ckpt"' echo "" echo " Get the start.ver file with the specified 'sam start method' and put it in directory ." echo "" } while getopts hs: OPT; do case $OPT in s) startmethod="$OPTARG" ;; h) usage exit 0 ;; *) usage exit 2 ;; esac done shift `/bin/expr $OPTIND - 1` if [ "$startmethod" = " " ]; then echo "Error: I need one -s argument." usage exit 2 fi installfile=$1/start.ver cat >$installfile <>$installfile ;; sb) echo 'open SAM "$build/bin/simulate -p n2 -s -Dpop= -c $RC -I system.rc"' >>$installfile ;; sr) echo 'open SAM "$build/bin/simulate -Dpop= -R $ckpt"' >>$installfile ;; *) usage exit 2 ;; esac cat >>$installfile <>> ' wait_prompt SAM clear SAM patterns open HYPER "-noecho /usr/bin/tip \$hyper_tty" log_user HYPER 0 open GUEST "-noecho /usr/bin/tip \$guest_tty" log_user GUEST 0 error HYPER "\[Pp]anic" error GUEST "\[Pp]anic" EOF