summaryrefslogtreecommitdiff
path: root/game_server/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'game_server/build.sh')
-rwxr-xr-xgame_server/build.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/game_server/build.sh b/game_server/build.sh
index 67e239f..1eb61a1 100755
--- a/game_server/build.sh
+++ b/game_server/build.sh
@@ -1,3 +1,21 @@
#!/usr/bin/env sh
-rustup run nightly cargo run
+case $1 in
+ ("")
+ if rustup run stable cargo --color always build; then
+ echo build success!
+ RUST_LOG=debug target/debug/game-server
+ else
+ echo build failed!
+ fi
+ ;;
+ -r)
+ sh build.sh &> err && cat err | tac
+ ;;
+ -c)
+ rustup run stable cargo clean
+ ;;
+ *)
+ echo invalid argument
+ ;;
+esac