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
d9e17c53
Commit
d9e17c53
authored
Mar 28, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play: add --installed support, cleanup
parent
f5c76143
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
10 deletions
+28
-10
epm-play
bin/epm-play
+28
-10
No files found.
bin/epm-play
View file @
d9e17c53
...
@@ -55,14 +55,21 @@ __get_app_description()
...
@@ -55,14 +55,21 @@ __get_app_description()
$1
--description
2>/dev/null
$1
--description
2>/dev/null
}
}
__
epm_play_run
()
__
check_play_script
()
{
{
local
script
=
"
$psdir
/
$1
.sh"
local
script
=
"
$psdir
/
$1
.sh"
shift
shift
if
[
!
-x
"
$script
"
]
;
then
[
-x
"
$script
"
]
fatal
"Can't find executable play script
$script
."
}
fi
__epm_play_run
()
{
local
script
=
"
$psdir
/
$1
.sh"
__check_play_script
"
$1
"
||
fatal
"Can't find executable play script
$script
. Run epm play to list all available apps."
shift
# allow use EGET in the scripts
# allow use EGET in the scripts
__set_EGET
__set_EGET
...
@@ -80,7 +87,7 @@ __epm_play_run()
...
@@ -80,7 +87,7 @@ __epm_play_run()
epm_play
()
epm_play
()
{
{
local
psdir
=
"
$
CONFIGDIR
/play.d
"
local
psdir
=
"
$
(
realpath
$CONFIGDIR
/play.d
)
"
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
cat
<<
EOF
cat
<<
EOF
...
@@ -112,8 +119,13 @@ if [ "$1" = "--update" ] ; then
...
@@ -112,8 +119,13 @@ if [ "$1" = "--update" ] ; then
if
[
"
$1
"
=
"all"
]
;
then
if
[
"
$1
"
=
"all"
]
;
then
shift
shift
for
i
in
$(
__list_installed_app
)
;
do
for
i
in
$(
__list_installed_app
)
;
do
echo
echo
"
$i
"
echo
"
$i
"
prescription
=
"
$i
"
prescription
=
"
$i
"
if
!
__check_play_script
$prescription
;
then
warning
"Can't find executable play script for
$prescription
. Try epm play --remove
$prescription
if you don't need it anymore."
continue
fi
__epm_play_run
$prescription
--run
"
$@
"
__epm_play_run
$prescription
--run
"
$@
"
done
done
exit
exit
...
@@ -128,8 +140,13 @@ if [ "$1" = "--update" ] ; then
...
@@ -128,8 +140,13 @@ if [ "$1" = "--update" ] ; then
exit
exit
fi
fi
if
[
"
$1
"
=
"--installed"
]
;
then
shift
__check_installed_app
"
$1
"
exit
fi
if
[
"
$1
"
=
"--list"
]
||
[
"
$1
"
=
"--installed"
]
;
then
if
[
"
$1
"
=
"--list"
]
;
then
shift
shift
local
i
local
i
if
[
-n
"
$short
"
]
;
then
if
[
-n
"
$short
"
]
;
then
...
@@ -171,10 +188,11 @@ if [ "$1" = "--list-all" ] || [ -z "$*" ] ; then
...
@@ -171,10 +188,11 @@ if [ "$1" = "--list-all" ] || [ -z "$*" ] ; then
done
done
echo
echo
echo
"run epm play"
echo
"run epm play"
echo
" --list - to list installed only"
echo
" --list - list installed apps"
echo
" --list-all (default) - to list all app"
echo
" --list-all (default) - list all apps"
echo
" --remove <app> - to remove app"
echo
" --remove <app> - remove <app>"
echo
" --update <app>|all - to update app or all installed apps"
echo
" --update <app>|all - update <app> or all installed apps"
echo
" --installed <app> - check if the app is installed"
echo
" --short (with --list) - list names only"
echo
" --short (with --list) - list names only"
exit
exit
fi
fi
...
...
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