Merge pull request #28 from tsosunchia/main

修补BUG
This commit is contained in:
tsosunchia
2022-05-27 22:45:55 +08:00
committed by GitHub

View File

@@ -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'