Results of "Installation help needed"
Bill Cattey
wdc at MIT.EDU
Thu Mar 11 02:57:58 UTC 1999
Thanks, Marcus for writing that script. You should note that although
it says it is #!/bin/sh, it is really a bash script and contains many
constructs that simply will not work under the ordinary bourne shell.
Regrettably, I found the differences in the process of doing a POWERFUL
customizing job on the script, so I can't just send a revised version.
Instead, here's a list of what to change if you want it to run under the
bourne shell:
if [ ! $SQUEAK_IMAGE ] ; then
export SQUEAK_IMAGE=$SQUEAK_USERDIR/Squeak$IMAGE_VERSION.image;
should be:
if [ -z "$SQUEAK_IMAGE" ] ; then
SQUEAK_IMAGE=$SQUEAK_USERDIR/Squeak$IMAGE_VERSION.image; export SQUEAK_IMAGE;
This is because you test a string for zero length to determine if a
variable is set, and you have to set and export as separate statements
in bourne shell.
if [ ! $DISPLAY ] ; then echo 'No X $DISPLAY Environment, starting
becomes:
if [ -z "$DISPLAY" ] ; then echo 'No X $DISPLAY Environment, starting headless
for the same reason.
or with the reversed logic:
if [ $SQUEAK_IMAGE ] ;
becomes:
if [ -n "$SQUEAK_IMAGE" ] ; then
if [ ! -e $SQUEAK_IMAGE ] ; then
becomes:
if [ ! -r $SQUEAK_IMAGE ] ; then
because you don't test for a file's existance, you test to see if a
readable file is present.
Two enhancements to suggest:
1. change "cp" to "cp -p" so that the date stamp will match the master
copy. When you're helping a new user, you will find it VERY useful to
glance at the VM and see if it matches the current VM's epoch.
2. change "mkdir" to "mkdir -p" This will allow unrestricted
specification of a user directory without having to worry about creating
the whole path piecewise.
Again, thank you VERY much for the script. It was DEFINITELY what we needed.
-wdc
More information about the Squeak-dev
mailing list
|