Commit aec208c4 authored by Vitaly Lipatov's avatar Vitaly Lipatov

improve MacOS support

parent a9a6c520
......@@ -237,6 +237,11 @@ elif [ `uname` = "SunOS" ] ; then
DISTRIB_ID="SunOS"
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
elif distro lsb-release && [ -n "$DISTRIB_RELEASE" ]; then
# use LSB
......
......@@ -84,6 +84,9 @@ case $PMTYPE in
ipkg)
docmd ipkg info $pkg_names
;;
homebrew)
docmd brew info $pkg_names
;;
*)
fatal "Have no suitable command for $PMTYPE"
;;
......
......@@ -88,7 +88,7 @@ case $PMTYPE in
fi
;;
homebrew)
CMD="brew $pkg_filenames"
CMD="brew list $pkg_filenames"
;;
ipkg)
CMD="ipkg list"
......
......@@ -99,6 +99,7 @@ __epm_search_make_grep()
# 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
for i in $list ; do
# FIXME -n on MacOS?
echo -n " | egrep -i --color -- \"$i\""
done
}
......
......@@ -61,7 +61,9 @@ epm_upgrade()
CMD="chocolatey update all"
;;
homebrew)
CMD="brew upgrade"
#CMD="brew upgrade"
sudocmd "brew upgrade `brew outdated`"
return
;;
ipkg)
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