fix: Readd renamed error_not_supported_release function, clean up

This commit is contained in:
zen0bit 2024-04-21 08:49:40 +02:00 committed by Martin Wimpress
parent 370d7d5843
commit 1f084009df

View File

@ -177,15 +177,6 @@ os_supported() {
fi
}
os_supported_release() {
if [[ ! " ${RELEASES[*]} " =~ " ${RELEASE} " ]]; then
echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release."
echo -n 'Supported releases: '
"releases_${OS}"
exit 1
fi
}
os_error_release() {
echo 'ERROR! You must specify a release.'
case ${OS} in
@ -221,6 +212,15 @@ function error_not_supported_os() {
exit 1
}
function error_not_supported_release() {
if [[ ! " ${RELEASES[*]} " =~ " ${RELEASE} " ]]; then
echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release."
echo -n 'Supported releases: '
"releases_${OS}"
exit 1
fi
}
function error_not_supported_edition() {
if [[ ! " ${EDITIONS[*]} " =~ " ${EDITION} " ]]; then
echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition\n"
@ -280,7 +280,7 @@ function validate_release() {
*) RELEASE_GENERATOR="${1}";;
esac
RELEASES=$(${RELEASE_GENERATOR})
os_supported_release
error_not_supported_release
}
function list_json() {
@ -3546,15 +3546,6 @@ fi
LANGS=()
os_supported_release() {
if [[ ! " ${RELEASES[*]} " =~ " ${RELEASE} " ]]; then
echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release."
echo -n 'Supported releases: '
"releases_${OS}"
exit 1
fi
}
os_error_edition() {
echo -en "ERROR! You must specify an edition.\n - Editions: "
#TODO ERROR here