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
580d39bf
Commit
580d39bf
authored
Mar 18, 2025
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play: speedup --list and --list-all (eterbug #17418)
parent
6d5e529c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
epm-play
bin/epm-play
+11
-5
epm-play-common
bin/epm-play-common
+6
-1
No files found.
bin/epm-play
View file @
580d39bf
...
...
@@ -52,6 +52,8 @@ __is_app_installed()
__get_app_package
()
{
grep
-oP
"^PKGNAME=[
\"
']*
\K
[^
\"
']+"
"
$psdir
/
$1
.sh"
&&
return
# fallback if PKGNAME is not set directly
__run_script
"
$1
"
--package-name
"
$2
"
"
$3
"
2>/dev/null
}
...
...
@@ -69,9 +71,12 @@ __list_app_packages_table()
{
local
name
for
name
in
$(
__list_all_app
)
;
do
local
pkg
=
"
$(
__get_app_package
$name
)
"
[
-n
"
$pkg
"
]
||
continue
echo
"
$pkg
$name
"
local
pkg
for
pkg
in
$(
__get_app_package
$name
)
;
do
echo
"
$pkg
$name
"
# check only first package
break
done
done
}
...
...
@@ -127,10 +132,11 @@ __list_installed_packages()
__epm_play_list_installed
()
{
local
i
local arch
=
"
$SYSTEMARCH
"
if
[
-n
"
$short
"
]
;
then
for
i
in
$(
__list_installed_app
)
;
do
# skip hidden apps
local
desc
=
"
$(
__get_app_description
$i
)
"
local
desc
=
"
$(
__get_app_description
$i
$arch
)
"
[
-n
"
$desc
"
]
||
continue
echo
"
$i
"
done
...
...
@@ -139,7 +145,7 @@ __epm_play_list_installed()
[
-n
"
$quiet
"
]
||
echo
"Installed applications:"
for
i
in
$(
__list_installed_app
)
;
do
# skip hidden apps
local
desc
=
"
$(
__get_app_description
$i
)
"
local
desc
=
"
$(
__get_app_description
$i
$arch
)
"
[
-n
"
$desc
"
]
||
continue
[
-n
"
$quiet
"
]
||
echo
-n
" "
printf
"%-20s - %s
\n
"
"
$i
"
"
$desc
"
...
...
bin/epm-play-common
View file @
580d39bf
...
...
@@ -47,7 +47,12 @@ __list_all_app()
# args: script, host arch
__get_app_description
()
{
__run_script
"
$1
"
--description
"
$2
"
2>/dev/null
local arch
=
"
$2
"
#__run_script "$1" --description "$arch" 2>/dev/null
#return
if
grep
-q
'^SUPPORTEDARCHES=.*\<'
"
$arch
"
'\>'
"
$psdir
/
$1
.sh"
||
grep
-q
"^SUPPORTEDARCHES=[
\"
'][
\"
']$"
"
$psdir
/
$1
.sh"
||
grep
-q
-v
"^SUPPORTEDARCHES="
"
$psdir
/
$1
.sh"
;
then
grep
-oP
"^DESCRIPTION=[
\"
']*
\K
[^
\"
']+"
"
$psdir
/
$1
.sh"
|
sed
-e
's| *#*$||'
fi
}
__check_play_script
()
...
...
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