feat: Add os_supported_release function

This commit is contained in:
zen0bit 2024-04-17 02:53:38 +02:00 committed by Martin Wimpress
parent 8768283af0
commit 60eae62ac7
1 changed files with 9 additions and 0 deletions

View File

@ -3786,6 +3786,15 @@ 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_supported_edition() {
if [[ ! " ${EDITIONS[*]} " =~ " ${EDITION} " ]]; then
echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition\n"