Explorar el Código

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

master
Jonathan Cobb hace 4 años
padre
commit
0f17e7fe1f
Se han modificado 2 ficheros con 20 adiciones y 0 borrados
  1. +10
    -0
      macos/install.sh
  2. +10
    -0
      macos/uninstall.sh

+ 10
- 0
macos/install.sh Ver fichero

@@ -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 Ver fichero

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


Cargando…
Cancelar
Guardar