feat: os_basedof function #1008

This commit is contained in:
Martin Wimpress 2024-04-16 13:24:15 +01:00
commit a6993b1b52
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
1 changed files with 8 additions and 0 deletions

View File

@ -133,6 +133,14 @@ function os_info() {
echo "${INFO}"
}
function os_basedof() {
local SIMPLE_NAME=""
local BASED=""
SIMPLE_NAME="${1}"
BASED=$(os_info "${SIMPLE_NAME}" | cut -d'|' -f2)
echo "${BASED}"
}
if [ "${1}" == '--test-iso-url' ] || [ "${1}" == '-t' ]; then
test_iso_url="on"
if [ -n "$4" ]; then