Add Unix shell script to wrap EasyBuild

This commit is contained in:
Elliot Nunn 2018-05-21 15:19:04 +08:00
parent 6d103981d8
commit 77023fea0f
3 changed files with 28 additions and 0 deletions

View File

@ -13,3 +13,8 @@ End
Make -w -d Sources=: -f "{MAKE_FILE}" RomMondo > "{MAKE_OUT}"
"{MAKE_OUT}"
# So that RomMondo is definitely the newest thing in the tree!
SetDirectory :BuildResults:RISC:Image:
Catenate RomMondo > RomMondoX
Rename -y RomMondoX RomMondo

19
EasyBuild.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
# Avoid the uber-slow step of running the emulator when nothing has changed
if [ ! -f BuildResults/RISC/Image/RomMondo ]
then
echo "RomMondo not yet built"
echo "> Starting emulator to build RomMondo"
empw EasyBuild
echo "< Emulator done"
exit
fi
echo "Checking for files updated since RomMondo"
find . ! -regex '.*/\..*' ! -iname '*.dmg' -newer BuildResults/RISC/Image/RomMondo | grep . || exit 0
echo "> Starting emulator to build RomMondo"
empw EasyBuild
echo "< Emulator done"

View File

@ -51,6 +51,10 @@ Using EMPW, that's:
empw EasyBuild
Even nicer is this Unix shell script, which avoids unnecessary launches of the emulator:
./EasyBuild.sh
The 3 MB image will be at `BuildResults/RISC/Image/RomMondo`.
What's next?