mirror of https://github.com/XTLS/Xray-install
Alpine: Move global variable to main function to fix runtime error after refactoring
parent
2e14edba2e
commit
fc8c3ed1c6
|
@ -3,10 +3,6 @@
|
||||||
|
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
TMP_DIRECTORY="$(mktemp -d)/"
|
|
||||||
ZIP_FILE="${TMP_DIRECTORY}Xray-linux-$MACHINE.zip"
|
|
||||||
DOWNLOAD_LINK="https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-$MACHINE.zip"
|
|
||||||
|
|
||||||
check_alpine() {
|
check_alpine() {
|
||||||
if [ -f /etc/alpine-release ]; then
|
if [ -f /etc/alpine-release ]; then
|
||||||
return 0
|
return 0
|
||||||
|
@ -214,6 +210,11 @@ main() {
|
||||||
check_if_running_as_root || return 1
|
check_if_running_as_root || return 1
|
||||||
identify_architecture || return 1
|
identify_architecture || return 1
|
||||||
install_software
|
install_software
|
||||||
|
|
||||||
|
TMP_DIRECTORY="$(mktemp -d)/"
|
||||||
|
ZIP_FILE="${TMP_DIRECTORY}Xray-linux-$MACHINE.zip"
|
||||||
|
DOWNLOAD_LINK="https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-$MACHINE.zip"
|
||||||
|
|
||||||
download_xray
|
download_xray
|
||||||
verification_xray
|
verification_xray
|
||||||
decompression
|
decompression
|
||||||
|
|
Loading…
Reference in New Issue