diff options
Diffstat (limited to 'lib/util/pkg.bash')
-rw-r--r-- | lib/util/pkg.bash | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/util/pkg.bash b/lib/util/pkg.bash index 1538c3e..1433815 100644 --- a/lib/util/pkg.bash +++ b/lib/util/pkg.bash @@ -33,10 +33,11 @@ pkg_install() { local app=$1 ; shift case "${BASHTARD_PLATFORM[key]}" in - freebsd) set -- /usr/sbin/pkg install -y "$app" ;; - linux-debian*) set -- apt install -y "$app" ;; - linux-gentoo) set -- emerge --ask=n --update "$app" ;; - linux-ubuntu) set -- apt install -y "$app" ;; + freebsd) set -- /usr/sbin/pkg install -y "$app" ;; + linux-alpine_linux) set -- apk add --no-cache "$app" ;; + linux-debian*) set -- apt install -y "$app" ;; + linux-gentoo) set -- emerge --ask=n --update "$app" ;; + linux-ubuntu) set -- apt install -y "$app" ;; *) crit "$system" "No package manager configured for ${BASHTARD_PLATFORM[key]}" return 1 @@ -54,10 +55,11 @@ pkg_uninstall() { local app=$1 ; shift case "${BASHTARD_PLATFORM[key]}" in - freebsd) set -- /usr/sbin/pkg uninstall -y "$app" ;; - linux-debian*) set -- apt remove -y "$app" ;; - linux-gentoo) set -- emerge --ask=n --unmerge "$app" ;; - linux-ubuntu) set -- apt remove -y "$app" ;; + freebsd) set -- /usr/sbin/pkg uninstall -y "$app" ;; + linux-alpine_linux) set -- apk del "$app" ;; + linux-debian*) set -- apt remove -y "$app" ;; + linux-gentoo) set -- emerge --ask=n --unmerge "$app" ;; + linux-ubuntu) set -- apt remove -y "$app" ;; *) crit "$system" "No package manager configured for ${BASHTARD_PLATFORM[key]}" return 1 |