Add spacing to compile.sh (#53)
This commit is contained in:
parent
482a2f2eb5
commit
6a4500733d
@ -1,28 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash -e
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
test -e compiled || mkdir compiled
|
test -e compiled || mkdir compiled
|
||||||
|
|
||||||
if [[ $# -ne 0 ]]; then
|
if [[ $# -ne 0 ]]; then
|
||||||
for i in "$@";
|
for sourcefile in "$@"
|
||||||
do
|
do
|
||||||
smxfile="`echo $i | sed -e 's/\.sp$/\.smx/'`";
|
smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`"
|
||||||
echo -e "Compiling $i...";
|
echo -e "\nCompiling $sourcefile..."
|
||||||
./spcomp $i -ocompiled/$smxfile
|
./spcomp $sourcefile -ocompiled/$smxfile
|
||||||
RETVAL=$?
|
|
||||||
if [ $RETVAL -ne 0 ]; then
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
else
|
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 -e "Compiling $sourcefile ..."
|
echo -e "\nCompiling $sourcefile ..."
|
||||||
./spcomp $sourcefile -ocompiled/$smxfile
|
./spcomp $sourcefile -ocompiled/$smxfile
|
||||||
RETVAL=$?
|
|
||||||
if [ $RETVAL -ne 0 ]; then
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user