From c5c20e48c7620ac9524302474d9856fe1fe67537 Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 11 Dec 2023 15:02:08 +0800 Subject: tools(secret): move build-secret.bash. --- tools/Crupest.V2ray/build-secret.bash | 41 ++++++++++++++++++++++++++++++++++ tools/build-secret.bash | 42 ----------------------------------- 2 files changed, 41 insertions(+), 42 deletions(-) create mode 100755 tools/Crupest.V2ray/build-secret.bash delete mode 100755 tools/build-secret.bash (limited to 'tools') 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!" diff --git a/tools/build-secret.bash b/tools/build-secret.bash deleted file mode 100755 index 7f3ac29..0000000 --- a/tools/build-secret.bash +++ /dev/null @@ -1,42 +0,0 @@ -#! /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 - -tools_dir=$(realpath "$(dirname "$0")") -secret_dir="$tools_dir/Crupest.V2ray" - -echo "Tools dir: ${tools_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!" -- cgit v1.2.3