Skip to content

Commit 240fa06

Browse files
time for improvements to the OS detection in the installer
1 parent e2ba65f commit 240fa06

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

utils/install.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
APPLE_SERVICES="${HOME}/Library/Services"
1212

1313
# Detects which macOS version.
14-
OS_VERS="$(sw_vers -buildVersion)"
15-
if [[ "$OS_VERS" > 16 ]]; then
14+
SW_VERS=$(sw_vers -buildVersion)
15+
OS_VERS=$(sed -E -e 's/([0-9]{2}).*/\1/' <<< "$SW_VERS")
16+
17+
if [[ "$OS_VERS" -ge 14 ]]; then
1618
# Copies files into the Services directory.
1719
cp -r ../scripts/iCloud\ No\ Sync.workflow "${APPLE_SERVICES}"
1820
cp -r ../scripts/iCloud\ Sync.workflow "${APPLE_SERVICES}"

0 commit comments

Comments
 (0)