Commit aec208c4 authored by Vitaly Lipatov's avatar Vitaly Lipatov

improve MacOS support

parent a9a6c520
...@@ -237,6 +237,11 @@ elif [ `uname` = "SunOS" ] ; then ...@@ -237,6 +237,11 @@ elif [ `uname` = "SunOS" ] ; then
DISTRIB_ID="SunOS" DISTRIB_ID="SunOS"
DISTRIB_RELEASE=$(uname -r) DISTRIB_RELEASE=$(uname -r)
# fixme: can we detect by some file?
elif [ `uname` = "Darwin" ] ; then
DISTRIB_ID="MacOS"
DISTRIB_RELEASE=$(uname -r)
# try use standart LSB info by default # try use standart LSB info by default
elif distro lsb-release && [ -n "$DISTRIB_RELEASE" ]; then elif distro lsb-release && [ -n "$DISTRIB_RELEASE" ]; then
# use LSB # use LSB
......
...@@ -84,6 +84,9 @@ case $PMTYPE in ...@@ -84,6 +84,9 @@ case $PMTYPE in
ipkg) ipkg)
docmd ipkg info $pkg_names docmd ipkg info $pkg_names
;; ;;
homebrew)
docmd brew info $pkg_names
;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal "Have no suitable command for $PMTYPE"
;; ;;
......
...@@ -88,7 +88,7 @@ case $PMTYPE in ...@@ -88,7 +88,7 @@ case $PMTYPE in
fi fi
;; ;;
homebrew) homebrew)
CMD="brew $pkg_filenames" CMD="brew list $pkg_filenames"
;; ;;
ipkg) ipkg)
CMD="ipkg list" CMD="ipkg list"
......
...@@ -99,6 +99,7 @@ __epm_search_make_grep() ...@@ -99,6 +99,7 @@ __epm_search_make_grep()
# FIXME: The World has not idea how to do grep both string # FIXME: The World has not idea how to do grep both string
# http://stackoverflow.com/questions/10110051/grep-with-two-strings-logical-and-in-regex?rq=1 # http://stackoverflow.com/questions/10110051/grep-with-two-strings-logical-and-in-regex?rq=1
for i in $list ; do for i in $list ; do
# FIXME -n on MacOS?
echo -n " | egrep -i --color -- \"$i\"" echo -n " | egrep -i --color -- \"$i\""
done done
} }
......
...@@ -61,7 +61,9 @@ epm_upgrade() ...@@ -61,7 +61,9 @@ epm_upgrade()
CMD="chocolatey update all" CMD="chocolatey update all"
;; ;;
homebrew) homebrew)
CMD="brew upgrade" #CMD="brew upgrade"
sudocmd "brew upgrade `brew outdated`"
return
;; ;;
ipkg) ipkg)
CMD="ipkg upgrade" CMD="ipkg upgrade"
......
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