Sfoglia il codice sorgente

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

master
Jonathan Cobb 4 anni fa
parent
commit
0f17e7fe1f
2 ha cambiato i file con 20 aggiunte e 0 eliminazioni
  1. +10
    -0
      macos/install.sh
  2. +10
    -0
      macos/uninstall.sh

+ 10
- 0
macos/install.sh Vedi File

@@ -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 Vedi File

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


Caricamento…
Annulla
Salva