From 5359cdc754b9c7a1ba969349a34afa23e1b2a607 Mon Sep 17 00:00:00 2001 From: anulax1225 Date: Fri, 19 Jan 2024 17:52:15 +0100 Subject: [PATCH] Added compiling shell script --- build | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 build diff --git a/build b/build new file mode 100755 index 0000000..1c4864f --- /dev/null +++ b/build @@ -0,0 +1,37 @@ +clear + +if [ -z ${CLEAR_BIN} ]; then + CLEAR_BIN=0 +fi +if [ -z ${AUTO_EXEC} ]; then + AUTO_EXEC=0 +fi + +if [ 1 -eq ${CLEAR_BIN} ]; then + echo [Clearing bin/bin-int dirs] + rm -rf bin bin-int +else + echo [Caching bin/bin-int dirs] +fi +echo [BUILDING PROJECT] +premake5 gmake2 +make $1 +echo [FINISHED BUILD] +if [ 1 -eq ${AUTO_EXEC} ]; then + config=$1 + if [ -z "$config" ]; then + config="config=debug" + fi + if [ "config=debug" == "$config" ]; then + echo [STARTING APP] + echo [Config: Debug] + bin/linux-x86_64-Debug/sandbox/sandbox + elif [ "config=release" == "$config" ]; then + echo [STARTING APP] + echo [Config: Release] + bin/linux-x86_64-Release/sandbox/sandbox + else + echo [Aborted Launch] + echo [Config Unknown] + fi +fi \ No newline at end of file