2016-10-24 15:50:24 +02:00
|
|
|
#!/bin/bash -e
|
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
|
2016-10-24 15:50:24 +02:00
|
|
|
for sourcefile in "$@"
|
2014-06-14 14:25:19 +02:00
|
|
|
do
|
2016-10-24 15:50:24 +02:00
|
|
|
smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`"
|
|
|
|
echo -e "\nCompiling $sourcefile..."
|
|
|
|
./spcomp $sourcefile -ocompiled/$smxfile
|
2014-06-14 14:25:19 +02:00
|
|
|
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/'`"
|
2016-10-24 15:50:24 +02:00
|
|
|
echo -e "\nCompiling $sourcefile ..."
|
2014-06-14 14:25:19 +02:00
|
|
|
./spcomp $sourcefile -ocompiled/$smxfile
|
|
|
|
done
|
2009-01-13 22:14:44 +01:00
|
|
|
fi
|