diff options
author | crupest <crupest@outlook.com> | 2024-02-01 22:20:33 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2024-02-01 22:20:33 +0800 |
commit | 7e2870588fb804aa58dcea88f8b8c3d070fea9dd (patch) | |
tree | b6eac64733d1bd534c291299be5b1a9e32415cc5 /tools/build-secret.bash | |
parent | ab5092888aa8208286d835e813c55c9f995356c6 (diff) | |
download | crupest-7e2870588fb804aa58dcea88f8b8c3d070fea9dd.tar.gz crupest-7e2870588fb804aa58dcea88f8b8c3d070fea9dd.tar.bz2 crupest-7e2870588fb804aa58dcea88f8b8c3d070fea9dd.zip |
tools(secret): add http proxy, v5 exe and basic v5 config support.
Diffstat (limited to 'tools/build-secret.bash')
-rwxr-xr-x | tools/build-secret.bash | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tools/build-secret.bash b/tools/build-secret.bash new file mode 100755 index 0000000..7f3ac29 --- /dev/null +++ b/tools/build-secret.bash @@ -0,0 +1,42 @@ +#! /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!" |