Add support for alpine Linux apk package manager

This commit is contained in:
Ian 2021-07-26 21:38:21 -07:00
parent 8da9beac09
commit 7e8a3e392d

View File

@ -173,6 +173,8 @@ sudo_package () {
elif [ "$PACKAGE_MANAGER" == 'brew' ]; then elif [ "$PACKAGE_MANAGER" == 'brew' ]; then
# shellcheck disable=2086,2048 # shellcheck disable=2086,2048
brew install $* brew install $*
# shellcheck disable=2086,2048
apk add $*
else else
error "Unknown package manager: $PACKAGE_MANAGER" error "Unknown package manager: $PACKAGE_MANAGER"
fi fi
@ -223,6 +225,8 @@ detect_package_manager () {
PACKAGE_MANAGER='port' PACKAGE_MANAGER='port'
elif command_exist brew; then elif command_exist brew; then
PACKAGE_MANAGER='brew' PACKAGE_MANAGER='brew'
elif command_exists apk; then
PACKAGE_MANAGER='apk'
else else
error "Could not find a package manager. Fail!" error "Could not find a package manager. Fail!"
fi fi