Files
scsh-0.5/cig/image2script
T
bdc 89c1f4b11b Summary:
Three changes
- Updated 0.5.2 to 0.5.3
- Updated for latest cygwin, removing MKS dependency
- Added cleaned up ODBC code

Details:

Updated 0.5.2 to 0.5.3

	M RELEASE
	M scsh.spec
	M bin/scsh-release
	M bin/scsh-test
	M doc/scsh-manual/front.tex
	M doc/scsh-manual/man.tex
	M scsh/minor-version-number
	M scsh/oldtop.scm
	M scsh/scsh-version.scm

Rebuilt to get new version number

	M initial.image

Remove MKS dependency now that Cygwin cat works on binary files
without munging with carriage returns and newlines.

	M cig/image2script

Changed cygwin32 to cygwin.

	M scsh/Makefile.in

Added #ifndef __CYGWIN__ around some pesky extern references.

	M scsh/scsh/network1.c
	M scsh/scsh/time1.c

Updated with optional ODBC bits. This is going to be hard to make nice
and clean. 

	M scsh/Makefile.in

New ODBC code

	A scsh/odbc/odbc.txt
	A scsh/odbc/odbc0.c
	A scsh/odbc/odbc0.scm
	A scsh/odbc/odbc1.c
	A scsh/odbc/odbc1.scm
	A scsh/odbc/odbc2.c
	A scsh/odbc/odbc2.scm
	A scsh/odbc/scsh-odbc.c

New odbc-interface and odbc-package

	M scsh/scsh/scsh-interfaces.scm
	M scsh/scsh/scsh-package.scm
2001-02-25 19:51:56 +00:00

48 lines
1.2 KiB
Bash
Executable File

#!/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 <image
# outputs this script:
# #!/usr/local/bin/svm -i
# ...image bits follow...
#
# Args:
# image2script /usr/bin/svm -h 4000000 -o /usr/bin/svm <image
# outputs this script:
# #!/usr/bin/svm \
# -h 4000000 -o /usr/bin/svm -i
# ...image bits follow...
#
# The exec system call won't handle the #! line if it contains more than
# 32 chars, so if the vm binary is over 28 chars, we have to use a /bin/sh
# trampoline.
# image2script /user1/lecturer/shivers/vc/scsh/s48/lib/svm -h 4000000 < ...
# outputs this script:
# #!/bin/sh -
# exec /user1/lecturer/shivers/vc/scsh/s48/lib/svm -h 4000000 -i $0 $*
# ...image bits follow...
#
# -Olin