From 9e43df154f365b7861a8764d3a803f1a358652c8 Mon Sep 17 00:00:00 2001 From: hamlinkrewson <87337864+hamlinkrewson@users.noreply.github.com> Date: Fri, 6 Aug 2021 11:50:01 -0500 Subject: [PATCH] Update Mac - Verify JumpCloud Service Account.md If this is switched to a zsh script, we can use the 'is-at-least' feature. --- .../Mac - Verify JumpCloud Service Account.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/PowerShell/JumpCloud Commands Gallery/Mac Commands/Mac - Verify JumpCloud Service Account.md b/PowerShell/JumpCloud Commands Gallery/Mac Commands/Mac - Verify JumpCloud Service Account.md index 04eb4c253..e0aef7cfc 100644 --- a/PowerShell/JumpCloud Commands Gallery/Mac Commands/Mac - Verify JumpCloud Service Account.md +++ b/PowerShell/JumpCloud Commands Gallery/Mac Commands/Mac - Verify JumpCloud Service Account.md @@ -9,14 +9,13 @@ mac #### Command ``` -#!/bin/bash +#!/bin/zsh +autoload is-at-least +macOSVer=$(sw_vers -productVersion) -MacOSMajorVersion=$(sw_vers -productVersion | cut -d '.' -f 1) -MacOSMinorVersion=$(sw_vers -productVersion | cut -d '.' -f 2) -MacOSPatchVersion=$(sw_vers -productVersion | cut -d '.' -f 3) - -if [[ $MacOSMajorVersion -eq 10 && $MacOSMinorVersion -lt 13 ]]; then - echo "Error: System must be running 10.13+ to install Service Account." +is-at-least "10.13" $macOSVer +if [[ ! $? == "0" ]]; then + echo "Error: System must be running 10.13+ to install Service Account." exit 2 fi