From 5f78dd182d46e722244cd91adfc7461980ebdda2 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Mon, 4 Aug 2025 02:00:41 +0300 Subject: Updated script to warn users when providing a version without a v prefix --- embeds/install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'embeds/install.sh') diff --git a/embeds/install.sh b/embeds/install.sh index c331f2f..adfb04e 100755 --- a/embeds/install.sh +++ b/embeds/install.sh @@ -107,6 +107,14 @@ download() { error "Command failed (exit code $rc): ${BLUE}${cmd}${NO_COLOR}" printf "\n" >&2 + + # warn if version doesn't start with 'v' + if [ "${VERSION}" != "latest" ] && [ "${VERSION#v}" = "${VERSION}" ]; then + info "This is likely due to the version not starting with 'v'." + info "Try again with 'v${VERSION}'." + return $rc + fi + info "This is likely due to Eko not yet supporting your configuration." info "If you would like to see a build for your configuration," info "please create an issue requesting a build for ${MAGENTA}${TARGET}${NO_COLOR}:" @@ -295,6 +303,13 @@ check_bin_dir() { fi } +check_version() { + # warn if version doesn't start with 'v' + if [ "${VERSION}" != "latest" ] && [ "${VERSION#v}" = "${VERSION}" ]; then + warn "Version '${VERSION}' does not start with 'v'." + fi +} + is_build_available() { arch="$1" platform="$2" @@ -452,6 +467,7 @@ fi info "Tarball URL: ${UNDERLINE}${BLUE}${URL}${NO_COLOR}" confirm "Install Eko ${GREEN}${VERSION}${NO_COLOR} to ${BOLD}${GREEN}${BIN_DIR}${NO_COLOR}?" check_bin_dir "${BIN_DIR}" +check_version install "${EXT}" completed "Eko ${VERSION} installed" -- cgit v1.3.1