###############THE ERROR:
gamsinst version 035
====================
Installation of GAMS distribution 22.4
Continue? (Y/N) y
Unpacking GAMS ...
estimated disk blocks needed : 20480, available : 1245373
executing--> ./gamsunpack
sh: ./gamsunpack: /bin/csh: bad interpreter: No existe el fichero o el directorio
Error running unpacking script ./gamsunpack
Aborting...
josesito@jfgpc 21.0 $
################# THE SCRIPT
########################################
#!/bin/csh -f
# you wouldn't think all this would be necessary, but . . .
if (1 == ${?LC_ALL} || 1 == ${?LC_COLLATE} || 1 == ${?LANG}) then
setenv LC_COLLATE POSIX
setenv LC_ALL POSIX
setenv LANG POSIX
endif
while (1)
ls *.zipaa >& /dev/null
if (0 == $status) then
foreach f ( *.zipaa )
set base = $f:r
cat ${base}.zip?? > ${base}.zip
if ($status != 0) then
echo "error concatenating ${base}.zip?? > ${base}.zip"
exit 1
endif
/bin/rm -f ${base}.zip??
end
endif
ls *.zip >& /dev/null
if (0 == $status) then
foreach f ( *.zip )
./gmsunzip -o $f
if ($status != 0) then
echo "error unzipping $f"
exit 2
endif
/bin/rm -f $f
end
endif
# check for *.z files, rename to *.Z (ftp munges names sometimes)
ls *.z >& /dev/null
if (0 == $status) then
foreach f (*.z)
set base = $f:r
mv ${base}.z ${base}.Z
if ($status != 0) then
echo "error moving ${base}.z to ${base}.Z"
exit 5
endif
end
endif
# check for *.z?? files, rename to *.Z?? (ftp munges names sometimes)
ls *.z?? >& /dev/null
if (0 == $status) then
foreach f (*.z??)
set base = $f:r
set ext = $f:e
if (${ext} == 'zip') then
continue
endif
set newext = `echo $ext | awk '{ printf "Z%s", substr($1,2) }'`
mv ${base}.${ext} ${base}.${newext}
if ($status != 0) then
echo "error moving ${base}.${ext} to ${base}.${newext}"
exit 6
endif
end
endif
ls *.tar.Zaa >& /dev/null
if (0 == $status) then
foreach f ( *.tar.Zaa )
set base = $f:r
cat ${base}.Z?? > ${base}.Z
if ($status != 0) then
echo "error concatenating ${base}.Z?? > ${base}.Z"
exit 7
endif
/bin/rm -f ${base}.Z??
end
endif
ls *.Z >& /dev/null
if (0 == $status) then
foreach f ( *.Z )
uncompress $f
if ($status != 0) then
echo "error uncompressing $f"
exit 8
endif
end
endif
ls *.tar >& /dev/null
if (0 == $status) then
foreach f ( *.tar )
tar xvf $f
if ($status != 0) then
echo "error untarring $f"
exit 9
endif
/bin/rm -f $f
end
endif
ls *.zip >& /dev/null || exit 0
end
exit 0