Bladeren bron

ensure we are on mac os before running install/uninstall script

master
Jonathan Cobb 4 jaren geleden
bovenliggende
commit
0f17e7fe1f
2 gewijzigde bestanden met toevoegingen van 20 en 0 verwijderingen
  1. +10
    -0
      macos/install.sh
  2. +10
    -0
      macos/uninstall.sh

+ 10
- 0
macos/install.sh Bestand weergeven

@@ -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}"


+ 10
- 0
macos/uninstall.sh Bestand weergeven

@@ -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}"


Laden…
Annuleren
Opslaan