Skip to content

Commit

Permalink
fix: switch the mirror selection responsibility to serverless (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricRibeiro committed Dec 14, 2022
1 parent 9b3cc75 commit cfd5d42
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash
export SLS_SCRIPT_URL="https://sls-standalone-sv-1300963013.cos.na-siliconvalley.myqcloud.com/install.sh"
SLS_GEO_LOCATION=us
if [ "$ORB_PARAM_MIRROR" = "cn" ]; then
export SLS_SCRIPT_URL="https://sls-standalone-1300963013.cos.ap-shanghai.myqcloud.com/install.sh"
export SLS_GEO_LOCATION=cn
fi
curl -o- -L "$SLS_SCRIPT_URL" | VERSION=$ORB_PARAM_SERVERLESS_VERSION bash

[ "$ORB_PARAM_MIRROR" = "cn" ] && locale=cn
[ "$ORB_PARAM_MIRROR" = "us" ] && locale=us

# Let Serverless handle mirror selection.
curl -o- -L https://slss.io/install | VERSION="$ORB_PARAM_SERVERLESS_VERSION" SLS_GEO_LOCATION="$locale" bash

# shellcheck disable=SC2016
echo 'export PATH=$HOME/.serverless/bin:$PATH' >> "$BASH_ENV"
# shellcheck disable=SC1090
Expand Down

0 comments on commit cfd5d42

Please sign in to comment.