Skip to content

Commit

Permalink
Added INSTALL_VER to Xray and Sing Box installers
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Jun 28, 2023
1 parent c0abc2f commit 9b033fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion install/singbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
appName="Sing Box"
debArch=$(uname -m)
transArch=$debArch
targetVer="1.2.6"
targetVer=${INSTALL_VER:-1.3.0}
case $debArch in
"x86_64" | "amd64")
transArch="amd64"
Expand Down
6 changes: 5 additions & 1 deletion install/xray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ if [ -e "./xray.zip" ] ; then
cp ./xray.zip $PREFIX/opt/xray/
else
echo "Downloading xray..."
curl -sLo $PREFIX/opt/xray/xray.zip https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-$transArch.zip
if [ "$INSTALL_VER" != "" ] ; then
curl -sLo $PREFIX/opt/xray/xray.zip https://github.com/XTLS/Xray-core/releases/download/v${INSTALL_VER}/Xray-linux-$transArch.zip
else
curl -sLo $PREFIX/opt/xray/xray.zip https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-$transArch.zip
fi
fi
echo "Extracting archive..."
cd $PREFIX/opt/xray/
Expand Down

0 comments on commit 9b033fb

Please sign in to comment.