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
Nurlan
eepm
Commits
cd3804cc
Commit
cd3804cc
authored
Apr 07, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play: optimize install checking with batch checking
parent
82a58f16
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
2 deletions
+37
-2
epm-play
bin/epm-play
+32
-2
common.sh
play.d/common.sh
+5
-0
No files found.
bin/epm-play
View file @
cd3804cc
...
...
@@ -61,16 +61,46 @@ __list_all_app()
done
}
__list_installed_app
()
__list_all_packages
()
{
local
name
for
name
in
$(
__list_all_app
)
;
do
__get_app_package
$name
done
}
# pkg app
__list_app_packages_table
()
{
local
name
for
name
in
$(
__list_all_app
)
;
do
__check_installed_app
$name
&&
echo
"
$name
"
echo
"
$(
__get_app_package
$name
)
$name
"
done
}
__list_installed_app
()
{
local
i
local
tapt
=
$(
mktemp
)
||
fatal
__list_app_packages_table
>
$tapt
# get all installed packages and convert it to a apps list
for
i
in
$(
epm query
--short
$(
cat
$tapt
|
sed
-e
's| .*$||'
)
2>/dev/null
)
;
do
grep
"^
$i
"
$tapt
|
sed
-e
's|^.* ||'
done
rm
-f
$tapt
return
cat
$epm_vardir
/installed-app 2>/dev/null
}
__get_app_package
()
{
local
script
=
"
$psdir
/
$1
.sh"
[
-x
"
$script
"
]
||
return
$script
--package
2>/dev/null
}
__get_app_description
()
{
local
script
=
"
$psdir
/
$1
.sh"
...
...
play.d/common.sh
View file @
cd3804cc
...
...
@@ -11,6 +11,11 @@ if [ "$1" = "--remove" ] ; then
exit
fi
if
[
"
$1
"
=
"--package"
]
;
then
echo
"
$PKGNAME
"
exit
fi
if
[
"
$1
"
=
"--installed"
]
;
then
epm installed
$PKGNAME
exit
...
...
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