[12365] in Athena Bugs
/mit/sunsoft/sun4bin/suncc could be improved
daemon@ATHENA.MIT.EDU (Theodore Ts'o)
Wed Aug 10 14:25:44 1994
Date: Wed, 10 Aug 1994 14:25:29 +0500
From: Theodore Ts'o <tytso@MIT.EDU>
To: bugs@MIT.EDU
Cc: alexp@MIT.EDU
The suncc shell script in /mit/sunsoft/sun4bin/suncc could be seriously
improved. Problems:
* It uses csh instead of sh, which is slower. (Also, it's in
general a better idea to write shell scripts using
/bin/sh in general.)
* Instead of executing the real cc program directly, it sets a
path and then tries to execute it. This is bad for two
reasons. First, setting a path under csh causes it to
scan all the directories in your path, which is slow.
(See above reason it being a bad idea to write csh
scripts.) Second, if /mit/sunsoft/sunwspro/cc doesn't
exist for some reason, very surprising things happen,
instead of getting an error message.
Enclosed please find a new and improved suncc script. I suggest that
/mit/sunsoft/sun4bin/suncc be replaced with the following script.
Thanks!!
- Ted
#!/bin/sh
if [ ! -d /mit/sunsoft ]
then
attach -q sunsoft
fi
sunbase=/mit/sunsoft/sunwspro
LD_LIBRARY_PATH=${sunbase}/SC2.0.1:/usr/openwin/lib
export LD_LIBRARY_PATH
LM_LICENSE_FILE=${sunbase}/SunTech_License/license.dat
export LM_LICENSE_FILE
SUNPRO_SB_EX_FILE_NAME=${sunbase}/SC2.0.1/lib/sun_source_brower.ex
export SUNPRO_SB_EX_FILE_NAME
exec ${sunbase}/bin/cc $*