From 251577417781a4e8b70da719cf1808e5ecbf6d89 Mon Sep 17 00:00:00 2001 From: Zumi Daxuya Date: Tue, 25 Jun 2024 08:57:51 +0700 Subject: [PATCH] fix: missing download_link variable It was because of a partial commit, sorry. I'm working on removing the version number string limit to enable e.g. `master`. --- rgbenv | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rgbenv b/rgbenv index 1420153..1fe7765 100755 --- a/rgbenv +++ b/rgbenv @@ -27,7 +27,7 @@ RGBDS_GIT="https://github.com/gbdev/rgbds" # The version number is directly appended after these variables -RGBDS_DOWNLOAD_BASE="https://api.github.com/repos/gbdev/rgbds/tarball/v" +RGBDS_DOWNLOAD_BASE="https://api.github.com/repos/gbdev/rgbds/tarball/" RGBDS_PREFIX="rgbds-" # --------------- Conditional defines ------------------------------------------------- @@ -303,6 +303,12 @@ _install () { local version=$1 local got_version=0 + local download_link + if [[ "$version" =~ ^[0-9] ]]; then + download_link="${RGBDS_DOWNLOAD_BASE}v${version}" + else + download_link="${RGBDS_DOWNLOAD_BASE}${version}" + fi checkverinstall "$version"