home *** CD-ROM | disk | FTP | other *** search
- #!/bin/csh -f
- if ($#argv == 0) then
- set foo = "$0"
- echo "Usage: $foo:t file.oak [locale [switches...]]"
- exit 2
- endif
-
- if (! $?OAKPATH) setenv OAKPATH /usr/misc/.oaklisp
-
- set file = $1:r
-
- shift
-
- if ($#argv == 0) then
- set locale = "system-locale"
- else
- set locale = "$1"
- shift
- endif
-
- set del = 0
-
- if (-e $file.oa) then
- mv -f $file.oa $file.oa~~
- set del = 1
- endif
-
- set switches = ($argv[1-]:q)
- if ($?OAKLISZT) then
- set switches = ($OAKLISZT $switches)
- endif
- if ($?OAKLISP) then
- set switches = ($OAKLISP $switches)
- endif
-
- echo $locale $file|$OAKPATH/etc/emulator $switches $OAKPATH/lib/oaklisp.%%z
-
- set res = $status
-
- if ($res == 0) then
- if ($del == 1) rm -f $file.oa~~
- exit 0
- endif
-
- if ($del == 1) then
- echo "Reverting object file."
- mv -f $file.oa~~ $file.oa
- endif
-
- exit $res
-