fix: Readd renamed error_not_supported_editions function, cleanup

This commit is contained in:
zen0bit 2024-04-21 08:32:38 +02:00 committed by Martin Wimpress
parent c5ec090970
commit 370d7d5843
1 changed files with 2 additions and 14 deletions

View File

@ -221,7 +221,7 @@ function error_not_supported_os() {
exit 1
}
os_supported_edition() {
function error_not_supported_edition() {
if [[ ! " ${EDITIONS[*]} " =~ " ${EDITION} " ]]; then
echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition\n"
echo -n ' - Editions: '
@ -3555,18 +3555,6 @@ os_supported_release() {
fi
}
os_supported_edition() {
if [[ ! " ${EDITIONS[*]} " =~ " ${EDITION} " ]]; then
echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition\n"
echo -n ' - Editions: '
for EDITION in "${EDITIONS[@]}"; do
echo -n "${EDITION} "
done
echo ""
exit 1
fi
}
os_error_edition() {
echo -en "ERROR! You must specify an edition.\n - Editions: "
#TODO ERROR here
@ -3746,7 +3734,7 @@ if [ -n "${2}" ]; then
EDITION=${EDITIONS[0]}
if [ -n "${3}" ]; then
EDITION="${3}"
os_supported_edition
error_not_supported_edition
else
os_error_edition
fi