From dc1a9e3296e913ac14d46bca039ea8dd174755bc Mon Sep 17 00:00:00 2001 From: ardocrat Date: Tue, 11 Jul 2023 17:53:00 +0300 Subject: [PATCH] build: add linux script --- build_and_run.sh => build_run_android.sh | 0 build_run_linux.sh | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) rename build_and_run.sh => build_run_android.sh (100%) create mode 100755 build_run_linux.sh diff --git a/build_and_run.sh b/build_run_android.sh similarity index 100% rename from build_and_run.sh rename to build_run_android.sh diff --git a/build_run_linux.sh b/build_run_linux.sh new file mode 100755 index 0000000..609ce19 --- /dev/null +++ b/build_run_linux.sh @@ -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 \ No newline at end of file