1#! /bin/sh 2 3# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4# ACTIONS 5# These are implemented as functions, and just called by the 6# short MAIN section below 7 8buildAction () { 9 echo "Building..." 10 11 # Now do build steps. 12 13} 14 15cleanAction () { 16 echo "Cleaning..." 17 18 # Do your clean steps here. 19 cd "$BUILD_DIR" || exit 1 20 rm -f cpuemu*.cpp cpudefs.cpp cputbl.h cpustbl*.cpp cpufunctbl*.cpp config*.h compemu.cpp compstbl.cpp comptbl.h 21} 22 23# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 24# MAIN 25 26echo "Running with ACTION=${ACTION}" 27 28case $ACTION in 29 # NOTE: for some reason, it gets set to "" rather than "build" when 30 # doing a build. 31 "") 32 buildAction 33 ;; 34 35 "clean") 36 cleanAction 37 ;; 38esac 39 40exit 0 41