瀏覽代碼

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

master
Jonathan Cobb 4 年之前
父節點
當前提交
0f17e7fe1f
共有 2 個檔案被更改,包括 20 行新增0 行删除
  1. +10
    -0
      macos/install.sh
  2. +10
    -0
      macos/uninstall.sh

+ 10
- 0
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}"


+ 10
- 0
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}"


Loading…
取消
儲存