Commit db8e70f8 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add support homebrew on MacOS

parent 062d8982
...@@ -83,8 +83,19 @@ epm_install_names() ...@@ -83,8 +83,19 @@ epm_install_names()
sudocmd mpkg install $@ sudocmd mpkg install $@
return ;; return ;;
slackpkg) slackpkg)
separate_installed $@
# TODO: use upgrade if package is already installed # TODO: use upgrade if package is already installed
sudocmd /usr/sbin/slackpkg install $@ [ -n "$pkg_noninstalled" ] && sudocmd /usr/sbin/slackpkg install $pkg_noninstalled
[ -n "$pkg_installed" ] && sudocmd /usr/sbin/slackpkg upgrade $pkg_installed
return ;;
homebrew)
separate_installed $@
[ -n "$pkg_noninstalled" ] && sudocmd brew install $pkg_noninstalled
[ -n "$pkg_installed" ] && sudocmd brew upgrade $pkg_installed
return ;;
ipkg)
[ -n "$force" ] && force=-force-depends
sudocmd ipkg $force install $@
return ;; return ;;
*) *)
fatal "Do not known install command for $PMTYPE" fatal "Do not known install command for $PMTYPE"
......
...@@ -57,6 +57,12 @@ case $PMTYPE in ...@@ -57,6 +57,12 @@ case $PMTYPE in
slackpkg) slackpkg)
CMD="ls -1 /var/log/packages/" CMD="ls -1 /var/log/packages/"
;; ;;
homebrew)
CMD="brew $pkg_filenames"
;;
ipkg)
CMD="ipkg list"
;;
*) *)
fatal "Do not known query command for $PMTYPE" fatal "Do not known query command for $PMTYPE"
;; ;;
......
...@@ -79,6 +79,10 @@ __epm_query_name() ...@@ -79,6 +79,10 @@ __epm_query_name()
npackd) npackd)
CMD="npackdcl path --package=$@" CMD="npackdcl path --package=$@"
;; ;;
brew)
warning "fix query"
return 1
;;
*) *)
_query_via_packages_list $@ _query_via_packages_list $@
return return
......
...@@ -90,6 +90,13 @@ epm_remove_names() ...@@ -90,6 +90,13 @@ epm_remove_names()
slackpkg) slackpkg)
sudocmd /usr/sbin/slackpkg remove $@ sudocmd /usr/sbin/slackpkg remove $@
return ;; return ;;
homebrew)
sudocmd brew remove $@
return ;;
ipkg)
[ -n "$force" ] && force=-force-depends
sudocmd ipkg $force remove $@
return ;;
*) *)
fatal "Do not known command for $PMTYPE" fatal "Do not known command for $PMTYPE"
;; ;;
......
...@@ -64,6 +64,9 @@ case $PMTYPE in ...@@ -64,6 +64,9 @@ case $PMTYPE in
docmd_foreach "/usr/sbin/slackpkg search" $pkg_filenames docmd_foreach "/usr/sbin/slackpkg search" $pkg_filenames
return return
;; ;;
homebrew)
CMD="brew search"
;;
*) *)
fatal "Do not known search command for $PMTYPE" fatal "Do not known search command for $PMTYPE"
;; ;;
......
...@@ -225,6 +225,12 @@ case $DISTRNAME in ...@@ -225,6 +225,12 @@ case $DISTRNAME in
Windows) Windows)
CMD="chocolatey" CMD="chocolatey"
;; ;;
MacOS)
CMD="homebrew"
;;
OpenWRT)
CMD="ipkg"
;;
*) *)
fatal "Do not known DISTRNAME $DISTRNAME" fatal "Do not known DISTRNAME $DISTRNAME"
;; ;;
......
...@@ -54,6 +54,12 @@ case $PMTYPE in ...@@ -54,6 +54,12 @@ case $PMTYPE in
deepsolver-rpm) deepsolver-rpm)
sudocmd ds-update sudocmd ds-update
;; ;;
homebrew)
sudocmd brew update
;;
ipkg)
sudocmd ipkg update
;;
*) *)
fatal "Do not known update command for $PMTYPE" fatal "Do not known update command for $PMTYPE"
;; ;;
......
...@@ -52,6 +52,12 @@ epm_upgrade() ...@@ -52,6 +52,12 @@ epm_upgrade()
chocolatey) chocolatey)
CMD="chocolatey update all" CMD="chocolatey update all"
;; ;;
homebrew)
CMD="brew upgrade"
;;
ipkg)
CMD="ipkg upgrade"
;;
slackpkg) slackpkg)
CMD="/usr/sbin/slackpkg upgrade-all" CMD="/usr/sbin/slackpkg upgrade-all"
;; ;;
......
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