From da861b3467348b7f997b0fa6d358a9b0b5f737f4 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 3 May 2024 12:46:43 +0200 Subject: [PATCH] Update define.sh --- src/define.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/define.sh b/src/define.sh index 8b4c812..cd0e104 100644 --- a/src/define.sh +++ b/src/define.sh @@ -221,7 +221,7 @@ printEdition() { return 0 } -getName() { +fromFile() { local id="" local desc="$1" @@ -283,7 +283,7 @@ getName() { return 0 } -getVersion() { +fromName() { local id="" local name="$1" @@ -302,6 +302,17 @@ getVersion() { *"windows vista"* ) id="winvista${PLATFORM,,}" ;; esac + echo "$id" + return 0 +} + +getVersion() { + + local id + local name="$1" + + id=$(fromName "$name") + case "${id,,}" in "win7"* | "winvista"* ) case "${name,,}" in