-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·58 lines (45 loc) · 1.08 KB
/
Copy pathbuild.sh
File metadata and controls
executable file
·58 lines (45 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env bash
set -e
echo "SETUP"
export DEVKIT_LOCATION="${HOME}/devkitBase"
# get path of currently running script
SCRIPT_PATH="$(realpath ${BASH_SOURCE})"
echo "script path" $SCRIPT_PATH
# remove script from base path
BASE_DIR="${SCRIPT_PATH%/*}"
echo "base dir: " $BASE_DIR
if [ ! -d "$BASE_DIR" ]; then
echo "ERROR: BASE DIR NOT FOUND"
exit
fi
BUILD_DIR="${BASE_DIR}/build"
echo "BUILD DIR " $BUILD_DIR
echo "BUILDING"
CLEAN_BUILD=0
if [ "$CLEAN_BUILD" -eq 1 ] && [ -d "$BUILD_DIR" ]; then
echo "Existing build dir, deleting now"
rm -rf $BUILD_DIR
mkdir -p $BUILD_DIR
cd $BUILD_DIR
cmake -G Ninja "$@" ..
else
echo "Build dir doesn't exist, creating one now"
mkdir -p $BUILD_DIR
cd $BUILD_DIR
cmake -G Ninja "$@" ..
fi
ninja
# echo
# echo ------------------
# echo Unit Tests
# echo ------------------
# "${BASE_DIR}/build/tests"
echo
echo ------------------
echo System Tests
echo ------------------
"${BASE_DIR}/tests/system-tests/start-system-tests.sh"
echo
echo ------------------
echo Build Success
echo ------------------