mirror of
https://github.com/thepigeongenerator/breakout_clone.git
synced 2025-12-16 22:05:45 +01:00
make further changes to the build script
This commit is contained in:
8
build.sh
8
build.sh
@@ -26,7 +26,7 @@ args_win86-64()
|
|||||||
args_emscripten()
|
args_emscripten()
|
||||||
{
|
{
|
||||||
ARCHITECTURE="web"
|
ARCHITECTURE="web"
|
||||||
COMPILER="/home/user/.local/bin/emcc"
|
COMPILER="emcc" # just make sure it's in $PATH (it's a pain to install)
|
||||||
ARGS="-s USE_SDL=2"
|
ARGS="-s USE_SDL=2"
|
||||||
FILE_EXSTENSION=".html"
|
FILE_EXSTENSION=".html"
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# make (and clear) the build directory
|
# make (and clear) the build directory
|
||||||
mkdir "$BUILD_DIR $BUILD_DIR/$ARCHITECTURE"
|
mkdir -p "$BUILD_DIR/$ARCHITECTURE"
|
||||||
rm -rf "${BUILD_DIR:?}/$ARCHITECTURE/*"
|
rm -rf "${BUILD_DIR:?}/$ARCHITECTURE/*"
|
||||||
|
|
||||||
# copy included files or directories to the build directory
|
# copy included files or directories to the build directory
|
||||||
@@ -58,8 +58,8 @@ fi
|
|||||||
EXE_PATH=$BUILD_DIR/$ARCHITECTURE/$PROJECT_NAME$FILE_EXSTENSION
|
EXE_PATH=$BUILD_DIR/$ARCHITECTURE/$PROJECT_NAME$FILE_EXSTENSION
|
||||||
echo "building at: $EXE_PATH"
|
echo "building at: $EXE_PATH"
|
||||||
|
|
||||||
# check whether the compiler path contains an executable at said path
|
# check whether the compiler can actually be executed
|
||||||
if [ ! -x "$COMPILER" ]; then
|
if [ ! -x "$COMPILER" ] && ! command -v "$COMPILER" > /dev/null; then
|
||||||
echo -e "\033[91mCouldn't find an executable at path: \033[0m $COMPILER"
|
echo -e "\033[91mCouldn't find an executable at path: \033[0m $COMPILER"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user