Skip to content

Commit

Permalink
Fix download url
Browse files Browse the repository at this point in the history
  • Loading branch information
pirackr committed Mar 2, 2024
1 parent 7b74bf3 commit aef8791
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,9 @@ install_telepresence() {

mkdir -p "${bin_install_path}"

if [[ $version =~ ^[0-9].\+ ]]; then
url_version="v$version"
else
url_version=$version
fi

echo "Downloading teplepresence from url: $(get_download_url "$url_version")"
echo "Downloading teplepresence from url: $(get_download_url "$version")"

if curl -Lksf "$(get_download_url "$url_version")" -o "$bin_path"; then
if curl -Lksf "$(get_download_url "$version")" -o "$bin_path"; then
chmod +x "$bin_path"
else
exit 1
Expand All @@ -48,7 +42,7 @@ get_cpu() {
}

get_download_url() {
echo "https://app.getambassador.io/download/tel2oss/releases/download/$1/telepresence-$(get_arch)-$(get_cpu)"
echo "https://app.getambassador.io/download/tel2oss/releases/download/v$1/telepresence-$(get_arch)-$(get_cpu)"
}

install_telepresence "$ASDF_INSTALL_TYPE" "$ASDF_INSTALL_VERSION" "$ASDF_INSTALL_PATH"

0 comments on commit aef8791

Please sign in to comment.