Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
d210c6d8
Commit
d210c6d8
authored
Jul 20, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm: get commands and options description from the code
parent
ad6e875e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
36 deletions
+29
-36
epm
bin/epm
+19
-36
epm-sh-functions
bin/epm-sh-functions
+10
-0
No files found.
bin/epm
View file @
d210c6d8
...
...
@@ -18,12 +18,6 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
# HACK
#ETERBUILDBIN=/usr/bin
# FIXME
#. /usr/share/eterbuild/eterbuild
#load_mod rpm git buildsrpm
PROGDIR
=
$(
dirname
$0
)
load_helper
()
...
...
@@ -44,20 +38,10 @@ phelp()
echo
"
$Descr
$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
$(
get_help HELPCMD
)
Options:
-v|--version
--verbose verbose mode
--auto non interactive mode
-h|--help this help
$(
get_help HELPOPT
)
"
}
...
...
@@ -100,53 +84,52 @@ esac
for
opt
in
"
$@
"
;
do
case
$opt
in
-h
|
--help
|
help
)
-h
|
--help
|
help
)
# HELPOPT: this help
phelp
;
exit
0
;;
-v
|
--version
)
print_version
exit
-v
|
--version
)
# HELPOPT: print version
print_version
;
exit
0
;;
--verbose
)
--verbose
)
# HELPOPT: verbose mode
verbose
=
1
;;
--auto
)
--auto
)
# HELPOPT: non interactive mode
non_interactive
=
1
;;
-i
|
install
|
add
)
-i
|
install
|
add
)
# HELPCMD: install package(s) from remote repositories or from local file
epm_cmd
=
install
;;
-e
|
-P
|
remove|delete
)
-e
|
-P
|
remove|delete
)
# HELPCMD: remove (delete) package(s) from the database and the system
epm_cmd
=
remove
;;
-qi
|
info
)
-qi
|
info
)
# HELPCMD: print package detail info
epm_cmd
=
info
;;
clean
)
clean
)
# HELPCMD: clean local package cache
epm_cmd
=
clean
;;
-qa
|
list|packages
)
-qa
|
list|packages
)
# HELPCMD: list of installed package(s)
epm_cmd
=
packages
;;
update
)
update
)
# HELPCMD: update remote package repository databases
epm_cmd
=
update
;;
dist-upgrade|upgrade
)
dist-upgrade|upgrade
)
# HELPCMD: performs upgrades of package software distributions
epm_cmd
=
upgrade
;;
-s
|
search
)
-s
|
search
)
# HELPCMD: search in remote package repositories
epm_cmd
=
search
;;
-q
|
installed
)
-q
|
installed
)
# HELPCMD: check presence of package(s)
epm_cmd
=
query
;;
-qf
|
which
)
-qf
|
which
)
# HELPCMD: query package(s) owning file
epm_cmd
=
query_file
;;
-ql
|
filelist
)
-ql
|
filelist
)
# HELPCMD: print package file list
epm_cmd
=
filelist
;;
check|simulate
)
check|simulate
)
# HELPCMD: simulate install (check requires)
epm_cmd
=
$opt
;;
*
)
...
...
bin/epm-sh-functions
View file @
d210c6d8
...
...
@@ -85,6 +85,16 @@ set_sudo()
fi
}
# print options description from HELPCMD/HELPOPT lines in the code
get_help
()
{
grep
"#
$1
"
$PROGDIR
/epm |
while
read
n
;
do
opt
=
$(
echo
$n
|
sed
-e
"s|) #
$1
:.*||g"
)
desc
=
$(
echo
$n
|
sed
-e
"s|.*) #
$1
:||g"
)
printf
" %-20s %s
\n
"
$opt
"
$desc
"
done
}
# FIXME: detect if not recognized
set_pm_type
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment