From 70006aaa13ca364d10ef6f00e73fb946454177b1 Mon Sep 17 00:00:00 2001 From: tsosunchia <59512455+tsosunchia@users.noreply.github.com> Date: Fri, 27 May 2022 22:43:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=80=BB=E8=BE=91=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nt_install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nt_install.sh b/nt_install.sh index c00eff9..e2c9e56 100644 --- a/nt_install.sh +++ b/nt_install.sh @@ -96,11 +96,13 @@ getLocation() { } checkPackageManger() { - if [[ "$(which brew)" ]]; then #务必将brew置于第一位,macOS的apt是假的 + if [[ ${osDistribution} == "darwin" ]]; then # brew update PACKAGE_MANAGEMENT_INSTALL='brew install' PACKAGE_MANAGEMENT_REMOVE='brew uninstall' - elif [[ "$(which apt)" ]]; then + return 0 + fi + if [[ "$(which apt)" ]]; then apt-get update PACKAGE_MANAGEMENT_INSTALL='apt-get -y --no-install-recommends install' PACKAGE_MANAGEMENT_REMOVE='apt-get purge'