mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-11-21 23:26:32 +00:00
Add support for alpine Linux apk package manager
This commit is contained in:
parent
41683da3a7
commit
e1c6c4d7a2
@ -141,6 +141,8 @@ sudo_package_update () {
|
|||||||
sudo port selfupdate
|
sudo port selfupdate
|
||||||
elif [ "$PACKAGE_MANAGER" == 'brew' ]; then
|
elif [ "$PACKAGE_MANAGER" == 'brew' ]; then
|
||||||
brew update
|
brew update
|
||||||
|
elif [ "$PACKAGE_MANAGER" == 'apk' ]; then
|
||||||
|
true
|
||||||
else
|
else
|
||||||
error "Unknown package manager: $PACKAGE_MANAGER"
|
error "Unknown package manager: $PACKAGE_MANAGER"
|
||||||
fi
|
fi
|
||||||
@ -173,6 +175,9 @@ sudo_package () {
|
|||||||
elif [ "$PACKAGE_MANAGER" == 'brew' ]; then
|
elif [ "$PACKAGE_MANAGER" == 'brew' ]; then
|
||||||
# shellcheck disable=2086,2048
|
# shellcheck disable=2086,2048
|
||||||
brew install $*
|
brew install $*
|
||||||
|
elif [ "$PACKAGE_MANAGER" == 'apk' ]; then
|
||||||
|
# shellcheck disable=2086,2048
|
||||||
|
apk add $*
|
||||||
else
|
else
|
||||||
error "Unknown package manager: $PACKAGE_MANAGER"
|
error "Unknown package manager: $PACKAGE_MANAGER"
|
||||||
fi
|
fi
|
||||||
@ -223,6 +228,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
|
||||||
|
Loading…
Reference in New Issue
Block a user