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

small fixes

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