Commit 4aec1e7b authored by Vitaly Lipatov's avatar Vitaly Lipatov

small fixes

parent c89a8552
...@@ -56,6 +56,9 @@ case $PMTYPE in ...@@ -56,6 +56,9 @@ case $PMTYPE in
conary) conary)
sudocmd conary verify sudocmd conary verify
;; ;;
homebrew)
sudocmd brew doctor
;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal "Have no suitable command for $PMTYPE"
;; ;;
......
...@@ -25,7 +25,7 @@ epm_conflicts_files() ...@@ -25,7 +25,7 @@ epm_conflicts_files()
case $(get_package_type $pkg_files) in case $(get_package_type $pkg_files) in
rpm) rpm)
docmd "rpm -q --conflicts -p" docmd "rpm -q --conflicts -p" $pkg_files
;; ;;
#deb) #deb)
# a= docmd dpkg -I $pkg_files | grep "^ *Depends:" | sed "s|^ *Depends:||g" # a= docmd dpkg -I $pkg_files | grep "^ *Depends:" | sed "s|^ *Depends:||g"
......
...@@ -32,6 +32,9 @@ __epm_info_rpm_low() ...@@ -32,6 +32,9 @@ __epm_info_rpm_low()
# realize _files part per package, not by PMTYPE (see filelist) # realize _files part per package, not by PMTYPE (see filelist)
epm_info() epm_info()
{ {
[ -n "$pkg_filenames" ] || fatal "Run info without names"
case $PMTYPE in case $PMTYPE in
apt-rpm) apt-rpm)
__epm_info_rpm_low && return __epm_info_rpm_low && return
......
...@@ -25,7 +25,7 @@ epm_programs() ...@@ -25,7 +25,7 @@ epm_programs()
local DESKTOPDIR=/usr/share/applications local DESKTOPDIR=/usr/share/applications
[ -d "$DESKTOPDIR" ] || fatal "There is no $DESKTOPDIR dir on the system." [ -d "$DESKTOPDIR" ] || fatal "There is no $DESKTOPDIR dir on the system."
#find /usr/share/applications -type f -name "*.desktop" | while read f; do pkg_files="$f" quiet=1 short=1 epm_query_file ; done | sort -u #find /usr/share/applications -type f -name "*.desktop" | while read f; do pkg_files="$f" quiet=1 short=1 epm_query_file ; done | sort -u
showcmd "find /usr/share/applications -type f -name "*.desktop" | xargs $0 -qf --quiet --short | sort -u" showcmd "find $DESKTOPDIR -type f -name "*.desktop" | xargs $0 -qf --quiet --short | sort -u"
find /usr/share/applications -type f -name "*.desktop" | \ find /usr/share/applications -type f -name "*.desktop" | \
xargs $0 -qf --quiet --short | sort -u xargs $0 -qf --quiet --short | sort -u
} }
...@@ -73,12 +73,14 @@ case $PMTYPE in ...@@ -73,12 +73,14 @@ case $PMTYPE in
apt-dpkg) apt-dpkg)
# FIXME: need fix for a few names case # FIXME: need fix for a few names case
if is_installed $pkg_names ; then if is_installed $pkg_names ; then
CMD="rpm -q --provides" echo "Please inform the author how to get provides from dpkg"
else fi
# CMD="rpm -q --provides"
#else
EXTRA_SHOWDOCMD=' | grep "Provides:"' EXTRA_SHOWDOCMD=' | grep "Provides:"'
docmd apt-cache show $pkg_names | grep "Provides:" docmd apt-cache show $pkg_names | grep "Provides:"
return return
fi #fi
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal "Have no suitable command for $PMTYPE"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
inputisatty() inputisatty()
{ {
# check stdin # check stdin
tty -s tty -s 2>/dev/null
} }
isatty() isatty()
...@@ -47,7 +47,8 @@ check_tty() ...@@ -47,7 +47,8 @@ check_tty()
export TERM export TERM
# egrep from busybox may not --color # egrep from busybox may not --color
if egrep --help | grep -q -- "--color" ; then # egrep from MacOS print help to stderr
if egrep --help 2>&1 | grep -q -- "--color" ; then
EGREPCOLOR="--color" EGREPCOLOR="--color"
fi fi
...@@ -80,15 +81,15 @@ restore_color() ...@@ -80,15 +81,15 @@ restore_color()
echover() echover()
{ {
[ -n "$verbose" ] || return [ -z "$verbose" ] && return
echo "$*" >&2 echo "$*" >&2
} }
# echo string without EOL # echo string without EOL
# FIXME: -n on MacOS?
echon() echon()
{ {
echo -n "$@" # default /bin/sh on MacOS does not recognize -n
/bin/echo -n "$@"
} }
......
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