Merge pull request #1 from Thepuppetqueen57/build-script
Added a build script
This commit is contained in:
34
debug-build.sh
Executable file
34
debug-build.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
# This has only been tested on Linux Mint
|
||||
#!/bin/bash
|
||||
|
||||
CLEAR_BUILD=false
|
||||
RUN_PROGRAM=false
|
||||
|
||||
# Checks flags
|
||||
# Idk why case statements look so weird in bash but it works lol
|
||||
# Use -r to run the program after building and use -c to clear the build folder after running
|
||||
while getopts "cr" opt; do
|
||||
case "$opt" in
|
||||
c)
|
||||
CLEAR_BUILD=true
|
||||
;;
|
||||
r)
|
||||
RUN_PROGRAM=true
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Builds Crab Crawler
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build
|
||||
cmake --build ./build
|
||||
|
||||
# Runs the program if the -r flag is provided
|
||||
if $RUN_PROGRAM; then
|
||||
echo "Running the Build..."
|
||||
./build/CrabCrawler
|
||||
fi
|
||||
|
||||
if $CLEAR_BUILD; then
|
||||
echo "Clearing build folder..."
|
||||
rm -rf build
|
||||
fi
|
||||
Reference in New Issue
Block a user