diff --git a/src/astral.sh-uv/install.sh b/src/astral.sh-uv/install.sh index 9b5eb09..0defa3c 100755 --- a/src/astral.sh-uv/install.sh +++ b/src/astral.sh-uv/install.sh @@ -8,8 +8,6 @@ readonly githubRepository='astral-sh/uv' readonly binaryName='uv' readonly versionArgument='--version' readonly os="unknown-linux-musl" -readonly downloadUrlTemplate='https://github.com/${githubRepository}/releases/download/${version}/${binaryName}-${architecture}-${os}.tar.gz' -readonly downloadUrlLatestTemplate='https://github.com/${githubRepository}/releases/latest/download/${binaryName}-${architecture}-${os}.tar.gz' readonly binaryTargetFolder='/usr/local/bin' readonly name="${githubRepository##*/}" readonly AUTOCOMPLETION="${SHELLAUTOCOMPLETION:-"true"}" @@ -29,7 +27,7 @@ apt_get_cleanup() { apt-get clean rm -rf /var/lib/apt/lists/* } -check_curl_envsubst_file_untar_installed() { +check_curl_file_untar_installed() { declare -a requiredAptPackagesMissing=() if ! [ -r '/etc/ssl/certs/ca-certificates.crt' ]; then requiredAptPackagesMissing+=('ca-certificates') @@ -37,9 +35,6 @@ check_curl_envsubst_file_untar_installed() { if ! command -v curl >/dev/null 2>&1; then requiredAptPackagesMissing+=('curl') fi - if ! command -v envsubst >/dev/null 2>&1; then - requiredAptPackagesMissing+=('gettext-base') - fi if ! command -v file >/dev/null 2>&1; then requiredAptPackagesMissing+=('file') fi @@ -130,22 +125,21 @@ enable_autocompletion() { } install() { utils_check_version "$VERSION" - check_curl_envsubst_file_untar_installed + check_curl_file_untar_installed readonly architecture="$(debian_get_arch)" - readonly binaryTargetPathTemplate='${binaryTargetFolder}/${binaryName}' if [ "$VERSION" == 'latest' ] || [ -z "$VERSION" ]; then # Avoid GitHub API rate limits by using the latest/download URL - readonly downloadUrl="$(echo -n "$downloadUrlLatestTemplate" | envsubst)" + readonly downloadUrl="https://github.com/${githubRepository}/releases/latest/download/${binaryName}-${architecture}-${os}.tar.gz" else readonly version="${VERSION:?}" - readonly downloadUrl="$(echo -n "$downloadUrlTemplate" | envsubst)" + readonly downloadUrl="https://github.com/${githubRepository}/releases/download/${version}/${binaryName}-${architecture}-${os}.tar.gz" fi curl_check_url "$downloadUrl" # The archive contains files under a directory: uv-${architecture}-${os}/ readonly uvPathInArchive="uv-${architecture}-${os}/$binaryName" readonly uvxPathInArchive="uv-${architecture}-${os}/uvx" readonly stripComponents="$(echo -n "$uvPathInArchive" | awk -F'/' '{print NF-1}')" - readonly binaryTargetPath="$(echo -n "$binaryTargetPathTemplate" | envsubst)" + readonly binaryTargetPath="${binaryTargetFolder}/${binaryName}" readonly uvxTargetPath="${binaryTargetFolder}/uvx" # Extract uv and uvx in a single download/untar curl_download_untar "$downloadUrl" "$stripComponents" "$binaryTargetFolder" "$uvPathInArchive" "$uvxPathInArchive" diff --git a/src/opencode.ai/install.sh b/src/opencode.ai/install.sh index 12ddd64..5629008 100755 --- a/src/opencode.ai/install.sh +++ b/src/opencode.ai/install.sh @@ -7,7 +7,6 @@ set -o allexport readonly githubRepository='sst/opencode' readonly binaryName='opencode' readonly versionArgument='--version' -readonly downloadUrlTemplate='https://github.com/${githubRepository}/releases/download/v${version}/${name}-linux-${architecture}.tar.gz' readonly binaryTargetFolder='/usr/local/bin' readonly name="${githubRepository##*/}" apt_get_update() { @@ -26,7 +25,7 @@ apt_get_cleanup() { apt-get clean rm -rf /var/lib/apt/lists/* } -check_curl_envsubst_file_unzip_installed() { +check_curl_file_unzip_installed() { declare -a requiredAptPackagesMissing=() if ! [ -r '/etc/ssl/certs/ca-certificates.crt' ]; then requiredAptPackagesMissing+=('ca-certificates') @@ -34,9 +33,6 @@ check_curl_envsubst_file_unzip_installed() { if ! command -v curl >/dev/null 2>&1; then requiredAptPackagesMissing+=('curl') fi - if ! command -v envsubst >/dev/null 2>&1; then - requiredAptPackagesMissing+=('gettext-base') - fi if ! command -v file >/dev/null 2>&1; then requiredAptPackagesMissing+=('file') fi @@ -116,16 +112,15 @@ utils_check_version() { } install() { utils_check_version "$VERSION" - check_curl_envsubst_file_unzip_installed + check_curl_file_unzip_installed readonly architecture="$(debian_get_arch)" - readonly binaryTargetPathTemplate='${binaryTargetFolder}/${binaryName}' if [ "$VERSION" == 'latest' ] || [ -z "$VERSION" ]; then VERSION=$(github_get_latest_release "$githubRepository") fi readonly version="${VERSION:?}" - readonly downloadUrl="$(echo -n "$downloadUrlTemplate" | envsubst)" + readonly downloadUrl="https://github.com/${githubRepository}/releases/download/v${version}/${name}-linux-${architecture}.tar.gz" curl_check_url "$downloadUrl" - readonly binaryTargetPath="$(echo -n "$binaryTargetPathTemplate" | envsubst)" + readonly binaryTargetPath="${binaryTargetFolder}/${binaryName}" curl_download_tarball "$downloadUrl" "$binaryTargetFolder" chmod 755 "$binaryTargetPath" }