strawberry-audio-player-win.../dist/macos/macversion.sh

15 lines
279 B
Bash
Raw Normal View History

2020-08-26 22:35:18 +02:00
#!/bin/sh
macos_version=$(sw_vers -productVersion| awk -F '[.]' '{print $2}')
macos_codenames=(
["13"]="highsierra"
["14"]="mojave"
["15"]="catalina"
)
if [[ -n "${macos_codenames[$macos_version]}" ]]; then
echo "${macos_codenames[$macos_version]}"
else
echo "unknown"
fi