Add spacing to compile.sh (#53)

This commit is contained in:
Wliu 2016-10-24 09:50:24 -04:00 committed by Asher Baker
parent 482a2f2eb5
commit 6a4500733d

View File

@ -1,28 +1,20 @@
#!/bin/bash
#!/bin/bash -e
cd "$(dirname "$0")"
test -e compiled || mkdir compiled
if [[ $# -ne 0 ]]; then
for i in "$@";
for sourcefile 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
smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`"
echo -e "\nCompiling $sourcefile..."
./spcomp $sourcefile -ocompiled/$smxfile
done
else
for sourcefile in *.sp
do
smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`"
echo -e "Compiling $sourcefile ..."
echo -e "\nCompiling $sourcefile ..."
./spcomp $sourcefile -ocompiled/$smxfile
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
exit 1;
fi
done
fi