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
7e526a27
Commit
7e526a27
authored
Feb 28, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm: move help to separate epm_<command>_help() function
parent
73057bf2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
40 deletions
+58
-40
epm-mark
bin/epm-mark
+11
-7
epm-play
bin/epm-play
+2
-2
epm-print
bin/epm-print
+21
-16
epm-repo
bin/epm-repo
+13
-7
epm-tool
bin/epm-tool
+11
-8
No files found.
bin/epm-mark
View file @
7e526a27
...
...
@@ -293,6 +293,16 @@ esac
}
epm_mark_help
()
{
echo
"mark is the interface for marking packages"
get_help HELPCMD
$SHAREDIR
/epm-mark
cat
<<
EOF
Examples:
epm mark hold mc
epm manual mc
EOF
}
epm_mark
()
{
...
...
@@ -300,13 +310,7 @@ epm_mark()
[
-n
"
$CMD
"
]
&&
shift
case
"
$CMD
"
in
""
|
"-h"
|
"--help"
|
help
)
# HELPCMD: help
echo
"mark is the interface for marking packages"
get_help HELPCMD
$SHAREDIR
/epm-mark
cat
<<
EOF
Examples:
epm mark hold mc
epm manual mc
EOF
epm_mark_help
;;
hold
)
# HELPCMD: mark the given package(s) as held back
epm_mark_hold
"
$@
"
...
...
bin/epm-play
View file @
7e526a27
...
...
@@ -215,7 +215,7 @@ __epm_play_list()
}
__
epm_play_help
()
epm_play_help
()
{
cat
<<
EOF
Usage: epm play [options] [<app>]
...
...
@@ -237,7 +237,7 @@ local psdir="$(realpath $CONFIGDIR/play.d)"
local
prsdir
=
"
$(
realpath
$CONFIGDIR
/prescription.d
)
"
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
__
epm_play_help
epm_play_help
exit
fi
...
...
bin/epm-print
View file @
7e526a27
...
...
@@ -256,6 +256,26 @@ construct_name()
echo
"
${
name
}${
version
}${
pds
}
$arch
.
$pkgtype
"
}
epm_print_help
()
{
cat
<<
EOF
Examples:
epm print info [args] print system and distro info (via distro_info command)
epm print name [from filename|for package] NN print only name of package name or package file
epm print version [from filename|for package] NN print only version of package name or package file
epm print release [from filename|for package] NN print only release of package name or package file
epm print version-release [from filename|for package] NN print only release-release of package name or package file
epm print field FF for package NN print field of the package
epm print pkgname from filename NN print package name for the package file
epm print srcname from filename NN print source name for the package file
epm print srcpkgname from [filename|package] NN print source package name for the binary package file
epm print specname from filename NN print spec filename for the source package file
epm print binpkgfilelist in DIR for NN list binary package(s) filename(s) from DIR for the source package file
epm print compare [package] version N1 N2 compare (package) versions and print -1, 0, 1
epm print constructname <name> <version> [arch] [ pkgtype] print distro dependend package filename from args name version arch pkgtype
EOF
}
epm_print
()
{
local
WHAT
=
"
$1
"
...
...
@@ -281,22 +301,7 @@ epm_print()
fatal
"Use epm print help to get help."
;;
"-h"
|
"--help"
|
"help"
)
cat
<<
EOF
Examples:
epm print info [args] print system and distro info (via distro_info command)
epm print name [from filename|for package] NN print only name of package name or package file
epm print version [from filename|for package] NN print only version of package name or package file
epm print release [from filename|for package] NN print only release of package name or package file
epm print version-release [from filename|for package] NN print only release-release of package name or package file
epm print field FF for package NN print field of the package
epm print pkgname from filename NN print package name for the package file
epm print srcname from filename NN print source name for the package file
epm print srcpkgname from [filename|package] NN print source package name for the binary package file
epm print specname from filename NN print spec filename for the source package file
epm print binpkgfilelist in DIR for NN list binary package(s) filename(s) from DIR for the source package file
epm print compare [package] version N1 N2 compare (package) versions and print -1, 0, 1
epm print constructname <name> <version> [arch] [ pkgtype] print distro dependend package filename from args name version arch pkgtype
EOF
epm_print_help
;;
"name"
)
[
-n
"
$1
"
]
||
fatal
"Arg is missed"
...
...
bin/epm-repo
View file @
7e526a27
...
...
@@ -19,20 +19,26 @@
load_helper epm-sh-altlinux
epm_repo
()
epm_repo
_help
()
{
local
CMD
=
"
$1
"
[
-n
"
$CMD
"
]
&&
shift
case
$CMD
in
"-h"
|
"--help"
|
help
)
# HELPCMD: help
get_help HELPCMD
$SHAREDIR
/epm-repo
cat
<<
EOF
get_help HELPCMD
$SHAREDIR
/epm-repo
cat
<<
EOF
Examples:
epm repo set p9
epm repo add autoimports
epm repo list
epm repo change yandex
EOF
}
epm_repo
()
{
local
CMD
=
"
$1
"
[
-n
"
$CMD
"
]
&&
shift
case
$CMD
in
"-h"
|
"--help"
|
help
)
# HELPCMD: help
epm_repo_help
;;
""
|
list
)
# HELPCMD: list packages
load_helper epm-repolist
...
...
bin/epm-tool
View file @
7e526a27
...
...
@@ -17,7 +17,17 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
epm_tool_help
()
{
echo
"Tools embedded in epm:"
get_help HELPCMD
$SHAREDIR
/epm-tool
cat
<<
EOF
Examples:
epm tool eget -U http://ya.ru
epm tool estrlist union a b a c
EOF
}
epm_tool
()
{
...
...
@@ -29,14 +39,7 @@ epm_tool()
fatal
"Use epm tool help to get help."
;;
"-h"
|
"--help"
|
"help"
)
echo
"Tools embedded in epm:"
get_help HELPCMD
$SHAREDIR
/epm-tool
cat
<<
EOF
Examples:
epm tool eget -U http://ya.ru
epm tool estrlist union a b a c
EOF
epm_tool_help
;;
"eget"
)
# HELPCMD: downloading tool (simular to wget or curl)
showcmd eget
"
$@
"
...
...
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