diff options
author | crupest <crupest@outlook.com> | 2023-12-11 15:02:08 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2024-03-25 22:15:58 +0800 |
commit | c5c20e48c7620ac9524302474d9856fe1fe67537 (patch) | |
tree | f596960fea46f3e11b5fe27a436b40bf0c3c1f16 /tools/Crupest.V2ray | |
parent | 26d843b555fb602b95dda3a9a84a3cc627398350 (diff) | |
download | crupest-c5c20e48c7620ac9524302474d9856fe1fe67537.tar.gz crupest-c5c20e48c7620ac9524302474d9856fe1fe67537.tar.bz2 crupest-c5c20e48c7620ac9524302474d9856fe1fe67537.zip |
tools(secret): move build-secret.bash.
Diffstat (limited to 'tools/Crupest.V2ray')
-rwxr-xr-x | tools/Crupest.V2ray/build-secret.bash | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tools/Crupest.V2ray/build-secret.bash b/tools/Crupest.V2ray/build-secret.bash new file mode 100755 index 0000000..bc5c7ee --- /dev/null +++ b/tools/Crupest.V2ray/build-secret.bash @@ -0,0 +1,41 @@ +#! /usr/bin/env bash + +set -e + +function print_argument_error_message_and_exit() { + argument_error_message="You must specify exactly one argument, the build target (win-x64 | linux-x64 | osx-x64)." + echo "$argument_error_message" + exit 1 +} + + + +if [[ $# != 1 ]]; then + print_argument_error_message_and_exit +fi + +case "$1" in + win-x64 | linux-x64 | osx-x64) + echo "Build target: $1" + ;; + *) + print_argument_error_message_and_exit + ;; +esac + +secret_dir=$(realpath "$(dirname "$0")") + +echo "Secret dir: ${secret_dir}" + +echo "Check dotnet..." +dotnet --version + +echo "Enter \"secret\" dir..." +pushd "$secret_dir" + +echo "Begin to build..." +dotnet publish Crupest.V2ray -c Release -o "$secret_dir/publish" --sc -r "$1" + +popd + +echo "Finish!" |