2008-03-30 09:00:22 +02:00
|
|
|
#!/bin/bash
|
2013-07-19 01:40:42 +02:00
|
|
|
cd "$(dirname "$0")"
|
2008-03-30 09:00:22 +02:00
|
|
|
|
|
|
|
test -e compiled || mkdir compiled
|
|
|
|
|
2014-06-14 14:25:19 +02:00
|
|
|
if [[ $# -ne 0 ]]; then
|
|
|
|
for i in "$@";
|
|
|
|
do
|
|
|
|
smxfile="`echo $i | sed -e 's/\.sp$/\.smx/'`";
|
|
|
|
echo -e "Compiling $i...";
|
|
|
|
./spcomp $i -ocompiled/$smxfile
|
|
|
|
RETVAL=$?
|
|
|
|
if [ $RETVAL -ne 0 ]; then
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
done
|
2009-01-13 22:14:44 +01:00
|
|
|
else
|
2014-06-14 14:25:19 +02:00
|
|
|
for sourcefile in *.sp
|
|
|
|
do
|
|
|
|
smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`"
|
|
|
|
echo -e "Compiling $sourcefile ..."
|
|
|
|
./spcomp $sourcefile -ocompiled/$smxfile
|
|
|
|
RETVAL=$?
|
|
|
|
if [ $RETVAL -ne 0 ]; then
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
done
|
2009-01-13 22:14:44 +01:00
|
|
|
fi
|