diff options
Diffstat (limited to 'game_server/build.sh')
-rwxr-xr-x | game_server/build.sh | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/game_server/build.sh b/game_server/build.sh index c42a7ac..5929e29 100755 --- a/game_server/build.sh +++ b/game_server/build.sh @@ -1,8 +1,21 @@ #!/usr/bin/env sh -if rustup run nightly cargo build; then - echo build success! - RUST_LOG=trace target/debug/game-server -else - echo build failed! -fi +case $1 in + ("") + if rustup run nightly cargo --color always build; then + echo build success! + RUST_LOG=info target/debug/game-server + else + echo build failed! + fi + ;; + -r) + sh build.sh &> err && cat err | tac + ;; + -c) + rustup run nightly cargo clean + ;; + *) + echo invalid argument + ;; +esac |