Commit a50589e4 authored by Vitaly Lipatov's avatar Vitaly Lipatov

aptU: initial realize for -l option

parent 69d3f90b
......@@ -8,9 +8,10 @@
load_mod gettext
if [ "$1" = "-h" ]; then
echog "aptU [-v] - update package and all it requires"
echog "aptU [-v] [-l] - update package and all it requires"
echog "Usage: aptU [package(s)]"
echog " -v - verbose"
echog " -l - print list of required packages"
exit 0
fi
......@@ -20,6 +21,13 @@ else
VERBOSE=">/dev/null"
fi
if [ "$1" = "-l" ] ; then
LISTFLAG=1
shift
fi
export LC_ALL=C
get_requires()
{
rpm --requires $@ | grep -v rpmlib | cut -f1 -d" " | sort -u
......@@ -70,3 +78,5 @@ install_packages()
}
install_packages $@
[ -n "$LISTFLAG" ] && echo "Possible requires packages for '$@': $ALREADYHANDLEDAPT"
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