build: add linux script
This commit is contained in:
parent
d1497ae711
commit
dc1a9e3296
2 changed files with 18 additions and 0 deletions
18
build_run_linux.sh
Executable file
18
build_run_linux.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
case $1 in
|
||||
debug|release)
|
||||
;;
|
||||
*)
|
||||
echo "Usage: build_and_run.sh [type] where is type is 'debug' or 'release'" >&2
|
||||
exit 1
|
||||
esac
|
||||
|
||||
type=$1
|
||||
[[ ${type} == "release" ]] && release_param+=(--release)
|
||||
cargo build ${release_param[@]} --target x86_64-unknown-linux-gnu
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
./target/x86_64-unknown-linux-gnu/release/grim
|
||||
fi
|
Loading…
Reference in a new issue