diff --git a/macos/install.sh b/macos/install.sh index 7f67f94..615efc7 100644 --- a/macos/install.sh +++ b/macos/install.sh @@ -15,6 +15,16 @@ function die { exit 1 } +PLATFORM="$(uname -a | awk '{print $1}')" +case "${PLATFORM}" in + Darwin*) + # OK + ;; + *) + die "This is the Mac OS X install.sh script. Cannot run on ${PLATFORM}" + ;; +esac + if [[ $(whoami) != "root" ]] ; then echo "Started as $(whoami), running sudo" sudo "${0}" diff --git a/macos/uninstall.sh b/macos/uninstall.sh index c6a010e..711815b 100644 --- a/macos/uninstall.sh +++ b/macos/uninstall.sh @@ -14,6 +14,16 @@ function die { exit 1 } +PLATFORM="$(uname -a | awk '{print $1}')" +case "${PLATFORM}" in + Darwin*) + # OK + ;; + *) + die "This is the Mac OS X install.sh script. Cannot run on ${PLATFORM}" + ;; +esac + if [[ $(whoami) != "root" ]] ; then echo "Started as $(whoami), running sudo" sudo "${0}"