Download the plain text (non-html) version of this script.
#!/usr/bin/tcsh -f
#
# ~/bin/mountiso
#
# Mount ISO image
#
# Dependencies: tcsh, priviledges to mount file systems
#
alias printusage 'echo "Mount ISO image" ; echo "Usage: $0 \n"'set errno=0
if ($#argv != 2) then
set errno=1
goto error
endif
# set isoimage=$1
# set mountpoint=$2
sudo mount -o loop -t iso9660 "$1" "$2"
if ($status != 0) then
echo "\nERR!mountiso: mount: $status\n" ; set errno=2 ; goto error
endif
goto done
done:
# unset {isoimage,mountpoint}
unalias printusage
exit $errno
error:
printusage
# unset {isoimage,mountpoint}
unalias printusage
exit $errno