From 0731f2f67c693abf428cab91e689ccdb56d2283c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 7 May 2023 16:12:39 +0200 Subject: [PATCH] validate CHANNEL, and mark "edge" and "nightly" deprecated The edge channel was already deprecated; the nightly channel has not been updated for a long time, so (for now) mark it as deprecated as well. Signed-off-by: Sebastiaan van Stijn --- install.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index cc2be83..dab36a7 100755 --- a/install.sh +++ b/install.sh @@ -25,10 +25,10 @@ SCRIPT_COMMIT_SHA="${LOAD_SCRIPT_COMMIT_SHA}" VERSION="${VERSION#v}" # The channel to install from: -# * nightly -# * test # * stable +# * test # * edge (deprecated) +# * nightly (unmaintained) DEFAULT_CHANNEL_VALUE="stable" if [ -z "$CHANNEL" ]; then CHANNEL=$DEFAULT_CHANNEL_VALUE @@ -71,6 +71,19 @@ case "$mirror" in ;; esac +case "$CHANNEL" in + stable|test) + ;; + edge|nightly) + >&2 echo "DEPRECATED: the $CHANNEL channel has been deprecated and no longer supported by this script." + exit 1 + ;; + *) + >&2 echo "unknown CHANNEL '$CHANNEL': use either stable or test." + exit 1 + ;; +esac + command_exists() { command -v "$@" > /dev/null 2>&1 }