SRC=$PWD PATCH=$1 shift;
TARGET="$@" OWLPROGRAM=~/owl/OwlProgram
usage(){
echo "\
^^ Owl ^^
Build an Owl patch and upload it to the device.
You must be in the folder containing the patch.
$ Owl PATCH [TARGET=run] [any other make options/target]
You need to set the path to OwlProgram in the configuration file
"
}
[ -z "$PATCH" ] && { usage; exit 1; }
[ -z "$TARGET" ] && TARGET=run;
make -C $OWLPROGRAM PATCHNAME=$PATCH PATCHSOURCE=$SRC $TARGET
echo make -C $OWLPROGRAM PATCHNAME=$PATCH PATCHSOURCE=$SRC $TARGET