Add validate_release() function

pull/139/head
Martin Wimpress 3 years ago committed by Martin Wimpress
parent 7d003eda88
commit 1b9eb20ba6
  1. 15
      quickget

@ -20,6 +20,21 @@ function pretty_name() {
esac esac
echo "${PRETTY_NAME}" echo "${PRETTY_NAME}"
} }
function validate_release() {
local DISPLAY_NAME=""
local RELEASE_GENERATOR="${1}"
local RELEASES=""
DISPLAY_NAME="$(pretty_name "${OS}")"
RELEASES=$(${RELEASE_GENERATOR})
if [[ "${RELEASES}" != *"${RELEASE}"* ]]; then
echo "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release."
echo "${RELEASES}"
exit 1
fi
}
function list_all() { function list_all() {
local DISPLAY_NAME local DISPLAY_NAME
local FUNC local FUNC

Loading…
Cancel
Save