aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar usrtax <iuser.link@gmail.com> 2022-09-02 14:12:33 +0800
committerGravatar GitHub <noreply@github.com> 2022-09-01 23:12:33 -0700
commit89524d55bdbe4a799d6eb8b4141ed7e2ebd0b3ce (patch)
treefd819666198c7fb9b3952138c6fd7e79a112ba19
parent2dc07d7505d44af58da3dd5a6d370f67ee80e0fd (diff)
downloadbun-89524d55bdbe4a799d6eb8b4141ed7e2ebd0b3ce.tar.gz
bun-89524d55bdbe4a799d6eb8b4141ed7e2ebd0b3ce.tar.zst
bun-89524d55bdbe4a799d6eb8b4141ed7e2ebd0b3ce.zip
allow set proxy for github (#1198)
in china , github is blocked, we use https://ghproxy.com/ for proxy for example use `wget https://ghproxy.com/https://github.com/stilleshan/ServerStatus/archive/master.zip` instead of `wget https://github.com/stilleshan/ServerStatus/archive/master.zip`
-rw-r--r--src/cli/install.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cli/install.sh b/src/cli/install.sh
index 60529129f..dc9f6aa4c 100644
--- a/src/cli/install.sh
+++ b/src/cli/install.sh
@@ -80,7 +80,9 @@ if [[ $target = darwin-x64 ]]; then
fi
fi
-github_repo="https://github.com/oven-sh/bun"
+GITHUB=${GITHUB-"https://github.com"}
+
+github_repo="$GITHUB/oven-sh/bun"
if [[ $target = darwin-x64 ]]; then
# If AVX2 isn't supported, use the -baseline build