Skip to content

Commit

Permalink
feat(download): using plafrom & arch function to combie URL
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoHsu committed May 23, 2021
1 parent 2b10b42 commit 7bd3a03
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,12 @@ download_release() {
local version filename url
version="$1"
filename="$2"
platform="macOS"
arch="64bit"
platform=$(get_platform)
arch=$(get_arch)

url="$GH_REPO/releases/download/v${version}/hugo_${version}_${platform}-${arch}.tar.gz"

echo "* Downloading $TOOL_NAME release $version..."
echo "${curl_opts[@]}" -o "$filename" -C - "$url" || fail "Could not download $url"
curl "${curl_opts[@]}" -o "$filename" -C - "$url" || fail "Could not download $url"
}

Expand Down

0 comments on commit 7bd3a03

Please sign in to comment.