Skip to content

Commit

Permalink
bootstrap-prod.sh: Add China workaround. Sigh.
Browse files Browse the repository at this point in the history
Signed-off-by: Hector Martin <marcan@marcan.st>
  • Loading branch information
marcan committed Apr 5, 2022
1 parent 31829e3 commit d16bc29
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/bootstrap-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export PATH="/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
export VERSION_FLAG=https://cdn.asahilinux.org/installer/latest
export INSTALLER_BASE=https://cdn.asahilinux.org/installer
export INSTALLER_DATA=https://github.com/AsahiLinux/asahi-installer/raw/prod/data/installer_data.json
export INSTALLER_DATA_ALT=https://alx.sh/installer_data.json
export REPO_BASE=https://cdn.asahilinux.org

#TMP="$(mktemp -d)"
Expand All @@ -31,7 +32,12 @@ PKG="installer-$PKG_VER.tar.gz"
echo " Downloading..."

curl --no-progress-meter -L -o "$PKG" "$INSTALLER_BASE/$PKG"
curl --no-progress-meter -L -O "$INSTALLER_DATA"
if ! curl --no-progress-meter -L -O "$INSTALLER_DATA"; then
echo " Error downloading installer_data.json. GitHub might be blocked in your network."
echo " Please consider using a VPN if you experience issues."
echo " Trying workaround..."
curl --no-progress-meter -L -O "$INSTALLER_DATA_ALT"
fi

echo " Extracting..."

Expand Down

1 comment on commit d16bc29

@lennylxx
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI, there is free service powered by open sourced project like https://ghproxy.com/ and basically you just prefix with https://ghproxy.com/, such as https://ghproxy.com/https://raw.githubusercontent.com/AsahiLinux/asahi-installer/prod/data/installer_data.json and it should work.

Please sign in to comment.