Skip to content

Commit 0e8f6c0

Browse files
committed
alternate download url added to installer
1 parent c7d4f36 commit 0e8f6c0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

installer.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@ forcecompile=off
1919
alldone=no
2020
checkRoot=on
2121
XDEBUG="off"
22+
alternateurl=on
2223

2324
INSTALL_DIRECTORY="./"
2425

2526
IGNORE_CERT="yes"
2627

27-
while getopts "rxucid:v:" opt; do
28+
while getopts "arxucid:v:" opt; do
2829
case $opt in
30+
a)
31+
alternateurl=on
32+
;;
2933
r)
3034
checkRoot=off
3135
;;
@@ -117,6 +121,10 @@ API_VERSION=$(echo "$VERSION_DATA" | grep api_version | cut -d ':' -f2- | tr -d
117121
VERSION_DATE=$(echo "$VERSION_DATA" | grep '"date"' | cut -d ':' -f2- | tr -d ' ",')
118122
VERSION_DOWNLOAD=$(echo "$VERSION_DATA" | grep '"download_url"' | cut -d ':' -f2- | tr -d ' ",')
119123

124+
if [ "$alternateurl" == "on" ]; then
125+
VERSION_DOWNLOAD=$(echo "$VERSION_DATA" | grep '"alternate_download_url"' | cut -d ':' -f2- | tr -d ' ",')
126+
fi
127+
120128
if [ "$(uname -s)" == "Darwin" ]; then
121129
BASE_VERSION=$(echo "$VERSION" | sed -E 's/([A-Za-z0-9_\.]*).*/\1/')
122130
VERSION_DATE_STRING=$(date -j -f "%s" $VERSION_DATE)

0 commit comments

Comments
 (0)