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