Skip to content

Commit

Permalink
Update ensure-rebar3.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
lsxredrain authored Jan 7, 2022
1 parent d06e2b3 commit 3714579
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/ensure-rebar3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ VERSION="$1"
# ensure dir
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/.."

DOWNLOAD_URL='https://github.com/emqx/rebar3/releases/download'
DOWNLOAD_URL='https://dgiot-dev-1306147891.cos.ap-nanjing.myqcloud.com'

download() {
echo "${DOWNLOAD_URL}/${VERSION}/rebar3"
curl -f -L "${DOWNLOAD_URL}/${VERSION}/rebar3" -o ./rebar3
}

Expand All @@ -22,10 +21,8 @@ version() {
}

if [ -f 'rebar3' ] && [ "$(version)" = "$VERSION" ]; then
echo $(version)
exit 0
exit 0
fi

echo download
download
chmod +x ./rebar3

0 comments on commit 3714579

Please sign in to comment.