#!/bin/sh - binary=$1 shift if [ `echo $binary | wc -c` -gt 28 ] ; then echo "#!/bin/sh -" echo exec $binary $* -i '"$0"' '"$@"' elif [ $# -gt 0 ] ; then echo '#!'$binary \\ echo $* -i else echo '#!'$binary -i fi exec cat # This program reads an S48 image from stdin and turns it into # an executable by prepending a #! prefix. The vm and its # args are passed to this program on the command line. # # If the vm binary is 27 chars or less, then we can directly # execute the vm with one of these scripts: # No args: # image2script /usr/local/bin/svm