mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Merge pull request #4454 from amekusa/fix-build-sh
Fix: `build_odin.sh` always runs demo regardless of argument
This commit is contained in:
+8
-4
@@ -152,9 +152,7 @@ build_odin() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run_demo() {
|
run_demo() {
|
||||||
if [ $# -eq 0 ] || [ "$1" = "debug" ]; then
|
|
||||||
./odin run examples/demo -vet -strict-style -- Hellope World
|
./odin run examples/demo -vet -strict-style -- Hellope World
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
@@ -166,14 +164,20 @@ if [ $# -eq 0 ]; then
|
|||||||
elif [ $# -eq 1 ]; then
|
elif [ $# -eq 1 ]; then
|
||||||
case $1 in
|
case $1 in
|
||||||
report)
|
report)
|
||||||
[ ! -f "./odin" ] && build_odin debug
|
if [ ! -f "./odin" ]; then
|
||||||
|
build_odin debug
|
||||||
|
run_demo
|
||||||
|
fi
|
||||||
./odin report
|
./odin report
|
||||||
;;
|
;;
|
||||||
|
debug)
|
||||||
|
build_odin debug
|
||||||
|
run_demo
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
build_odin $1
|
build_odin $1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
run_demo
|
|
||||||
else
|
else
|
||||||
error "Too many arguments!"
|
error "Too many arguments!"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user