I don't have any experience writing .sh files. I want to run the pvm2raw utility of this app from the Volume Library.
I get the following error when running build.sh in Ubuntu 10.10.

build.sh is as follows:
# make command
set mmfile=V3Makefile
set make="make -f $mmfile"
set rule=$1
if ($rule == "") set rule="all" // line 16
if ($rule == "deps") then
if ($HOSTTYPE == "iris4d") $make MAKEDEPEND="CC -M" OPTS="-DHAVE_CONFIG_H -DVIEWER_HAVE_DCMTK" TARGET=IRIX depend
if ($HOSTTYPE == "i386") $make MAKEDEPEND="c++ -M -I/usr/X11R6/include" OPTS="-DHAVE_CONFIG_H -DVIEWER_HAVE_DCMTK" TARGET=LINUX depend
What's wrong there?
Edit: I followed jw013's advice and installed csh. Now I get the following error:

How can I solve this Undefined variable problem?
cshscript? It seems so ... primeval. – jw013 Feb 11 '12 at 5:08cshscript namedbuild.sh? Double eww. – Keith Thompson Feb 11 '12 at 23:41sh ./build.sh. If you had run it as./build.sh, you would have gotten a different error message. – Keith Thompson Feb 11 '12 at 23:49