Improve compile.sh to accept filenames (bug 3550, r=dvander).

This commit is contained in:
jonasfietz 2009-01-13 16:14:44 -05:00
parent fb8f46ea45
commit 5a0528de26

View File

@ -2,10 +2,20 @@
test -e compiled || mkdir compiled test -e compiled || mkdir compiled
if [[ $# -ne 0 ]]
then
for i in "$@";
do
smxfile="`echo $i | sed -e 's/\.sp$/\.smx/'`";
echo -n "Compiling $i...";
./spcomp $i -ocompiled/$smxfile
done
else
for sourcefile in *.sp for sourcefile in *.sp
do do
smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`" smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`"
echo -n "Compiling $sourcefile ..." echo -n "Compiling $sourcefile ..."
./spcomp $sourcefile -ocompiled/$smxfile ./spcomp $sourcefile -ocompiled/$smxfile
done done
fi