From 927efe07102bd92ce5e4d7ea7887ef4116ef94aa Mon Sep 17 00:00:00 2001 From: Meo597 <197331664+Meo597@users.noreply.github.com> Date: Sat, 12 Apr 2025 00:39:56 +0800 Subject: [PATCH] Alpine: check alpine --- alpinelinux/install-release.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/alpinelinux/install-release.sh b/alpinelinux/install-release.sh index 6c71a56..5a492fe 100644 --- a/alpinelinux/install-release.sh +++ b/alpinelinux/install-release.sh @@ -58,6 +58,14 @@ 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() { + if [ -f /etc/alpine-release ]; then + return 0 + else + return 1 + fi +} + install_software() { if [[ -n "$(command -v curl)" ]]; then return @@ -183,7 +191,7 @@ information() { } main() { - install_software + check_alpine || return 1 install_software download_xray verification_xray