Commit 15616615 authored by Danil Mikhailov's avatar Danil Mikhailov

epm: added alpine apk package manager install, update, remove, qa, search commands

parent 3caa1ace
...@@ -51,6 +51,7 @@ pkgtype() ...@@ -51,6 +51,7 @@ pkgtype()
gentoo) echo "tbz2" ;; gentoo) echo "tbz2" ;;
windows) echo "exe" ;; windows) echo "exe" ;;
android) echo "apk" ;; android) echo "apk" ;;
alpine) echo "apk" ;;
cygwin) echo "tar.xz" ;; cygwin) echo "tar.xz" ;;
debian|ubuntu|mint|runtu|mcst) echo "deb" ;; debian|ubuntu|mint|runtu|mcst) echo "deb" ;;
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles) alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles)
...@@ -130,6 +131,11 @@ elif distro slackware-version ; then ...@@ -130,6 +131,11 @@ elif distro slackware-version ; then
DISTRIB_ID="Slackware" DISTRIB_ID="Slackware"
DISTRIB_RELEASE="$(grep -Eo [0-9]+\.[0-9]+ $DISTROFILE)" DISTRIB_RELEASE="$(grep -Eo [0-9]+\.[0-9]+ $DISTROFILE)"
elif distro os-release ; then
. /etc/os-release
DISTRIB_ID="$ID"
DISTRIB_RELEASE="$VERSION_ID"
elif distro arch-release ; then elif distro arch-release ; then
DISTRIB_ID="ArchLinux" DISTRIB_ID="ArchLinux"
DISTRIB_RELEASE="2010" DISTRIB_RELEASE="2010"
......
...@@ -163,6 +163,9 @@ epm_install_names() ...@@ -163,6 +163,9 @@ epm_install_names()
nix) nix)
__separate_sudocmd "nix-env --install" "nix-env --upgrade" $@ __separate_sudocmd "nix-env --install" "nix-env --upgrade" $@
return ;; return ;;
apk)
sudocmd apk add $@
return ;;
guix) guix)
__separate_sudocmd "guix package -i" "guix package -i" $@ __separate_sudocmd "guix package -i" "guix package -i" $@
return ;; return ;;
...@@ -231,6 +234,9 @@ epm_ni_install_names() ...@@ -231,6 +234,9 @@ epm_ni_install_names()
nix) nix)
sudocmd nix-env --install $@ sudocmd nix-env --install $@
return ;; return ;;
apk)
sudocmd apk add $@
return ;;
#android) #android)
# sudocmd pm install $@ # sudocmd pm install $@
# return ;; # return ;;
......
...@@ -122,6 +122,9 @@ case $PMTYPE in ...@@ -122,6 +122,9 @@ case $PMTYPE in
ipkg) ipkg)
CMD="ipkg list" CMD="ipkg list"
;; ;;
apk)
CMD="apk info"
;;
guix) guix)
CMD="guix package -I" CMD="guix package -I"
;; ;;
......
...@@ -107,6 +107,9 @@ epm_remove_names() ...@@ -107,6 +107,9 @@ epm_remove_names()
nix) nix)
sudocmd nix-env --uninstall $@ sudocmd nix-env --uninstall $@
return ;; return ;;
apk)
sudocmd apk del $@
return ;;
guix) guix)
sudocmd guix package -r $@ sudocmd guix package -r $@
return ;; return ;;
......
...@@ -64,6 +64,9 @@ case $PMTYPE in ...@@ -64,6 +64,9 @@ case $PMTYPE in
mpkg) mpkg)
CMD="mpkg search" CMD="mpkg search"
;; ;;
apk)
CMD="apk search"
;;
conary) conary)
CMD="conary repquery" CMD="conary repquery"
;; ;;
......
...@@ -469,6 +469,9 @@ case $DISTRNAME in ...@@ -469,6 +469,9 @@ case $DISTRNAME in
Cygwin) Cygwin)
CMD="aptcyg" CMD="aptcyg"
;; ;;
alpine)
CMD="apk"
;;
*) *)
fatal "Have no suitable DISTRNAME $DISTRNAME" fatal "Have no suitable DISTRNAME $DISTRNAME"
;; ;;
......
...@@ -80,6 +80,9 @@ case $PMTYPE in ...@@ -80,6 +80,9 @@ case $PMTYPE in
ipkg) ipkg)
sudocmd ipkg update sudocmd ipkg update
;; ;;
apk)
sudocmd apk update
;;
pkgsrc) pkgsrc)
# portsnap extract for the first time? # portsnap extract for the first time?
sudocmd portsnap fetch update sudocmd portsnap fetch update
......
...@@ -459,6 +459,9 @@ case $DISTRNAME in ...@@ -459,6 +459,9 @@ case $DISTRNAME in
Cygwin) Cygwin)
CMD="aptcyg" CMD="aptcyg"
;; ;;
alpine)
CMD="apk"
;;
*) *)
fatal "Have no suitable DISTRNAME $DISTRNAME" fatal "Have no suitable DISTRNAME $DISTRNAME"
;; ;;
...@@ -1706,6 +1709,9 @@ epm_install_names() ...@@ -1706,6 +1709,9 @@ epm_install_names()
nix) nix)
__separate_sudocmd "nix-env --install" "nix-env --upgrade" $@ __separate_sudocmd "nix-env --install" "nix-env --upgrade" $@
return ;; return ;;
apk)
sudocmd apk add $@
return ;;
guix) guix)
__separate_sudocmd "guix package -i" "guix package -i" $@ __separate_sudocmd "guix package -i" "guix package -i" $@
return ;; return ;;
...@@ -1773,6 +1779,9 @@ epm_ni_install_names() ...@@ -1773,6 +1779,9 @@ epm_ni_install_names()
nix) nix)
sudocmd nix-env --install $@ sudocmd nix-env --install $@
return ;; return ;;
apk)
sudocmd apk add $@
return ;;
#android) #android)
# sudocmd pm install $@ # sudocmd pm install $@
# return ;; # return ;;
...@@ -2236,6 +2245,9 @@ case $PMTYPE in ...@@ -2236,6 +2245,9 @@ case $PMTYPE in
ipkg) ipkg)
CMD="ipkg list" CMD="ipkg list"
;; ;;
apk)
CMD="apk info"
;;
guix) guix)
CMD="guix package -I" CMD="guix package -I"
;; ;;
...@@ -3262,6 +3274,9 @@ epm_remove_names() ...@@ -3262,6 +3274,9 @@ epm_remove_names()
nix) nix)
sudocmd nix-env --uninstall $@ sudocmd nix-env --uninstall $@
return ;; return ;;
apk)
sudocmd apk del $@
return ;;
guix) guix)
sudocmd guix package -r $@ sudocmd guix package -r $@
return ;; return ;;
...@@ -3693,6 +3708,9 @@ case $PMTYPE in ...@@ -3693,6 +3708,9 @@ case $PMTYPE in
mpkg) mpkg)
CMD="mpkg search" CMD="mpkg search"
;; ;;
apk)
CMD="apk search"
;;
conary) conary)
CMD="conary repquery" CMD="conary repquery"
;; ;;
...@@ -4194,6 +4212,9 @@ case $PMTYPE in ...@@ -4194,6 +4212,9 @@ case $PMTYPE in
ipkg) ipkg)
sudocmd ipkg update sudocmd ipkg update
;; ;;
apk)
sudocmd apk update
;;
pkgsrc) pkgsrc)
# portsnap extract for the first time? # portsnap extract for the first time?
sudocmd portsnap fetch update sudocmd portsnap fetch update
...@@ -4446,6 +4467,7 @@ pkgtype() ...@@ -4446,6 +4467,7 @@ pkgtype()
gentoo) echo "tbz2" ;; gentoo) echo "tbz2" ;;
windows) echo "exe" ;; windows) echo "exe" ;;
android) echo "apk" ;; android) echo "apk" ;;
alpine) echo "apk" ;;
cygwin) echo "tar.xz" ;; cygwin) echo "tar.xz" ;;
debian|ubuntu|mint|runtu|mcst) echo "deb" ;; debian|ubuntu|mint|runtu|mcst) echo "deb" ;;
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles) alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles)
...@@ -4525,6 +4547,11 @@ elif distro slackware-version ; then ...@@ -4525,6 +4547,11 @@ elif distro slackware-version ; then
DISTRIB_ID="Slackware" DISTRIB_ID="Slackware"
DISTRIB_RELEASE="$(grep -Eo [0-9]+\.[0-9]+ $DISTROFILE)" DISTRIB_RELEASE="$(grep -Eo [0-9]+\.[0-9]+ $DISTROFILE)"
elif distro os-release ; then
. /etc/os-release
DISTRIB_ID="$ID"
DISTRIB_RELEASE="$VERSION_ID"
elif distro arch-release ; then elif distro arch-release ; then
DISTRIB_ID="ArchLinux" DISTRIB_ID="ArchLinux"
DISTRIB_RELEASE="2010" DISTRIB_RELEASE="2010"
......
...@@ -457,6 +457,9 @@ case $DISTRNAME in ...@@ -457,6 +457,9 @@ case $DISTRNAME in
Cygwin) Cygwin)
CMD="aptcyg" CMD="aptcyg"
;; ;;
alpine)
CMD="apk"
;;
*) *)
fatal "Have no suitable DISTRNAME $DISTRNAME" fatal "Have no suitable DISTRNAME $DISTRNAME"
;; ;;
...@@ -871,6 +874,7 @@ pkgtype() ...@@ -871,6 +874,7 @@ pkgtype()
gentoo) echo "tbz2" ;; gentoo) echo "tbz2" ;;
windows) echo "exe" ;; windows) echo "exe" ;;
android) echo "apk" ;; android) echo "apk" ;;
alpine) echo "apk" ;;
cygwin) echo "tar.xz" ;; cygwin) echo "tar.xz" ;;
debian|ubuntu|mint|runtu|mcst) echo "deb" ;; debian|ubuntu|mint|runtu|mcst) echo "deb" ;;
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles) alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles)
...@@ -950,6 +954,11 @@ elif distro slackware-version ; then ...@@ -950,6 +954,11 @@ elif distro slackware-version ; then
DISTRIB_ID="Slackware" DISTRIB_ID="Slackware"
DISTRIB_RELEASE="$(grep -Eo [0-9]+\.[0-9]+ $DISTROFILE)" DISTRIB_RELEASE="$(grep -Eo [0-9]+\.[0-9]+ $DISTROFILE)"
elif distro os-release ; then
. /etc/os-release
DISTRIB_ID="$ID"
DISTRIB_RELEASE="$VERSION_ID"
elif distro arch-release ; then elif distro arch-release ; then
DISTRIB_ID="ArchLinux" DISTRIB_ID="ArchLinux"
DISTRIB_RELEASE="2010" DISTRIB_RELEASE="2010"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment