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
3fde8937
Commit
3fde8937
authored
Apr 15, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm search: use direct args
parent
7cde2258
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
epm
bin/epm
+2
-0
epm-search
bin/epm-search
+4
-3
epm-simulate
bin/epm-simulate
+1
-1
No files found.
bin/epm
View file @
3fde8937
...
...
@@ -155,6 +155,7 @@ case $PROGNAME in
;;
epms
)
# HELPSHORT: alias for epm search
epm_cmd
=
search
direct_args
=
1
;;
epmsf
)
# HELPSHORT: alias for epm search file
epm_cmd
=
search_file
...
...
@@ -216,6 +217,7 @@ check_command()
;;
-s
|
search|s|find|sr
)
# HELPCMD: search in remote package repositories
epm_cmd
=
search
direct_args
=
1
;;
-qp
|
qp|query_package
)
# HELPCMD: search in the list of installed packages
epm_cmd
=
query_package
...
...
bin/epm-search
View file @
3fde8937
...
...
@@ -222,23 +222,24 @@ __epm_search_make_grep()
fi
}
# we need internal implementation because regular epm_search uses quotes_args
__epm_search_internal
()
{
[
-n
"
$
pkg_filenames
"
]
||
fatal
"Search: search argument(s) is missed"
[
-n
"
$
1
"
]
||
fatal
"Search: search argument(s) is missed"
# it is useful for first time running
update_repo_if_needed soft
warmup_bases
__epm_search_output
$(
get_firstarg
$
pkg_filenames
)
|
grep
"
$pkg_filenames
"
__epm_search_output
$(
get_firstarg
$
@
)
|
grep
"
$*
"
}
# copied from korinf/tools/run-script/scripts/search
epm_search
()
{
[
-n
"
$
pkg_filenames
"
]
||
fatal
"Search: search argument(s) is missed"
[
-n
"
$
1
"
]
||
fatal
"Search: search argument(s) is missed"
# it is useful for first time running
update_repo_if_needed soft
...
...
bin/epm-simulate
View file @
3fde8937
...
...
@@ -130,7 +130,7 @@ EOF
# use verbose for get package status
#pkg_filenames="$pkg-[0-9]" verbose=--verbose __epm_search_internal | grep -E "(installed|upgrade)" && continue
#pkg_filenames="$pkg" verbose=--verbose __epm_search_internal | grep -E "(installed|upgrade)" && continue
(
pkg_filenames
=
"
$pkg
"
__epm_search_internal
)
|
grep
-q
"^
$pkg
-[0-9]"
&&
continue
__epm_search_internal
"
$pkg
"
|
grep
-q
"^
$pkg
-[0-9]"
&&
continue
res
=
1
info
"Package '
$pkg
' does not found in repository."
done
...
...
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