Commit c2f3c920 authored by Vitaly Lipatov's avatar Vitaly Lipatov

improve command description and add more commands

parent 939af88d
...@@ -48,17 +48,21 @@ phelp() ...@@ -48,17 +48,21 @@ phelp()
{ {
echo "$Descr echo "$Descr
$Usage $Usage
Commands:
-i|install install package(s) from remote repositories or from local file
-e|remove remove (delete) package(s) from the database and the system
-s|search search in remote package repositories
-qa|list|packages list of installed package(s)
-qf|which query package(s) owning file
-q check presence of package(s)
update update remote package repository databases
upgrade performs upgrades of package software distributions
-i|install install package(s)
-e|remove remove package(s)
-s|search search in remote and local package base
-qa|list|packages list of installed package(s)
-qf query package(s) owning file
-q check presence of package(s)
Options: Options:
-v|--verbose verbose mode -v|--version
--auto non interactive mode --verbose verbose mode
-h|--help this help --auto non interactive mode
-h|--help this help
" "
} }
...@@ -114,10 +118,10 @@ for opt in "$@" ; do ...@@ -114,10 +118,10 @@ for opt in "$@" ; do
--auto) --auto)
non_interactive=1 non_interactive=1
;; ;;
-i|install) -i|install|add)
epm_cmd=install epm_cmd=install
;; ;;
-e|remove) -e|-P|remove|delete)
epm_cmd=remove epm_cmd=remove
;; ;;
-qi|info) -qi|info)
...@@ -141,12 +145,15 @@ for opt in "$@" ; do ...@@ -141,12 +145,15 @@ for opt in "$@" ; do
-q|installed) -q|installed)
epm_cmd=query epm_cmd=query
;; ;;
-qf) -qf|which)
epm_cmd=query_file epm_cmd=query_file
;; ;;
-ql|filelist) -ql|filelist)
epm_cmd=filelist epm_cmd=filelist
;; ;;
check|simulate)
epm_cmd=$opt
;;
*) *)
if [ -f "$opt" ] ; then if [ -f "$opt" ] ; then
pkg_files="$pkgfiles $opt" pkg_files="$pkgfiles $opt"
......
...@@ -41,8 +41,7 @@ case $DISTRNAME in ...@@ -41,8 +41,7 @@ case $DISTRNAME in
CMD="rpm -ql" CMD="rpm -ql"
;; ;;
*) *)
RET=1 fatal "Do not known query command for $PMTYPE"
CMD="echo \"Do not known query command for DISTRNAME $DISTRNAME\""
;; ;;
esac esac
......
...@@ -47,7 +47,7 @@ echo $CMD ...@@ -47,7 +47,7 @@ echo $CMD
epm_simulate() epm_simulate()
{ {
[ -n "$pkg_names" ] || fatal "Run install without packages" [ -n "$pkg_names" ] || fatal "Run $epm_cmd without packages"
CMD=$(epm_install_sim $DISTRNAME) CMD=$(epm_install_sim $DISTRNAME)
docmd $SUDO $CMD $pkg_names docmd $SUDO $CMD $pkg_names
......
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