From cccc2a61bb246a614ac3a339c991fda21281ce15 Mon Sep 17 00:00:00 2001 From: Quinn <99677023+thepigeongenerator@users.noreply.github.com> Date: Thu, 12 Sep 2024 00:41:09 +0200 Subject: [PATCH] add executable check in build --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.sh b/build.sh index a53c019..bb0eb26 100755 --- a/build.sh +++ b/build.sh @@ -58,6 +58,11 @@ fi EXE_PATH=$BUILD_DIR/$ARCHITECTURE/$PROJECT_NAME$FILE_EXSTENSION echo "building at: $EXE_PATH" +if [ ! -x $COMPILER ]; then + echo -e "\033[91mCouldn't find an executable at path: \033[0m $COMPILER" + exit -1 +fi + # compile the code COMMAND="$COMPILER `find ./src -name *.c` -o $EXE_PATH -Wall -g -lm $ARGS" echo "using command: $COMMAND"