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
Vladislav
eepm
Commits
92ec2bd4
Commit
92ec2bd4
authored
Apr 15, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm: implement list (with --available and --installed options)
parent
8b957627
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
0 deletions
+78
-0
epm
bin/epm
+4
-0
epm-list
bin/epm-list
+74
-0
No files found.
bin/epm
View file @
92ec2bd4
...
...
@@ -278,6 +278,10 @@ check_command()
epm_cmd
=
packages
direct_args
=
1
;;
list
)
# HELPCMD: print list of packages
epm_cmd
=
list
direct_args
=
1
;;
# it is too hard operation, so just list name is very short for it
list-available
)
# HELPCMD: print list of all available packages
epm_cmd
=
list_available
...
...
bin/epm-list
0 → 100644
View file @
92ec2bd4
#!/bin/sh
#
# Copyright (C) 2023 Etersoft
# Copyright (C) 2023 Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
epm_list_help
()
{
cat
<<
EOF
epm list - list packages
Usage: epm list [options] [package]
Options:
--available list only available packages
--installed list only installed packages
EOF
# --all list all packages (default)
}
epm_list
()
{
local
option
=
"
$1
"
if
[
-z
"
$1
"
]
;
then
# locally installed packages by default
load_helper epm-packages
epm_packages
"
$@
"
return
fi
shift
case
"
$option
"
in
-h
|
--help
)
epm_list_help
return
;;
#--all)
# # TODO: exclude locally installed?
# epm_list_available
# return
# ;;
--available
)
# TODO: exclude locally installed?
load_helper epm-list_available
epm_list_available
"
$@
"
return
;;
--installed
)
load_helper epm-packages
epm_packages
"
$@
"
return
;;
*
)
fatal
"Unknown option
$option
, use epm list --help to get info"
;;
esac
epm_list_help
>
&2
fatal
"Run with appropriate option"
}
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