aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2021-05-09 14:39:25 +0200
committerDanielGavin <danielgavin5@hotmail.com>2021-05-09 14:39:25 +0200
commitcbb60c8bcaf2e32c56404cf148f94f5dccb0a5f2 (patch)
tree64a899c668c27b04e8816fd54b2597c0b98ca521
parent3d7d4cd2be2b460be0eaf6954d48ff04197212fc (diff)
fix build.sh
-rwxr-xr-xbuild.sh26
1 files changed, 11 insertions, 15 deletions
diff --git a/build.sh b/build.sh
index 1c8236c..3dbf83d 100755
--- a/build.sh
+++ b/build.sh
@@ -1,23 +1,19 @@
#!/usr/bin/env bash
if [[ $1 == "CI" ]]
-then
- ODIN="Odin/odin"
-else
- ODIN="odin"
-fi
+then
+ #BUG in odin test, it makes the executable with the same name as a folder and gets confused.
+ cd tests
-#BUG in odin test, it makes the executable with the same name as a folder and gets confused.
-cd tests
+ ../Odin/odin test ../tests -collection:shared=../src
-${ODIN} test ../tests -collection:shared=../src
+ if ([ $? -ne 0 ])
+ then
+ echo "Test failed"
+ exit 1
+ fi
-if ([ $? -ne 0 ] && [[ $1 == "CI" ]])
-then
- echo "Test failed"
- exit 1
+ cd ..
fi
-cd ..
-
-${ODIN} build src/ -show-timings -collection:shared=src -out:ols -opt:2
+odin build src/ -show-timings -collection:shared=src -out:ols -opt:2