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
fcef1a06
Commit
fcef1a06
authored
Apr 02, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play: check for a script in prescription.d also, add --list-scripts for list…
epm play: check for a script in prescription.d also, add --list-scripts for list prescription.d scripts
parent
b9bfcc89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
epm-play
bin/epm-play
+16
-4
No files found.
bin/epm-play
View file @
fcef1a06
...
...
@@ -67,8 +67,6 @@ __check_play_script()
__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
...
...
@@ -142,6 +140,7 @@ Options:
--update [<app>|all] - update <app> (or all installed apps) if there is new version
--list - list all installed apps
--list-all - list all available apps
--list-scripts - list all available scripts
--short (with --list) - list names only"
--installed <app> - check if the app is installed"
EOF
...
...
@@ -150,6 +149,7 @@ EOF
epm_play
()
{
local
psdir
=
"
$(
realpath
$CONFIGDIR
/play.d
)
"
local
prsdir
=
"
$(
realpath
$CONFIGDIR
/prescription.d
)
"
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
__epm_play_help
...
...
@@ -216,9 +216,21 @@ if [ "$1" = "--list-all" ] || [ -z "$*" ] ; then
exit
fi
if
[
"
$1
"
=
"--list-scripts"
]
;
then
[
-n
"
$short
"
]
||
[
-n
"
$quiet
"
]
||
echo
"Run with a name of a play script to run:"
__epm_play_list
$prsdir
exit
fi
prescription
=
"
$1
"
shift
#__check_installed_app "$prescription" && info "$$prescription is already installed (use --remove to remove)" && exit 1
__epm_play_run
"
$prescription
"
--run
"
$@
"
&&
__save_installed_app
"
$prescription
"
||
fatal
"There was some error during install the application."
if
__check_play_script
"
$prescription
"
;
then
#__check_installed_app "$prescription" && info "$$prescription is already installed (use --remove to remove)" && exit 1
__epm_play_run
"
$prescription
"
--run
"
$@
"
&&
__save_installed_app
"
$prescription
"
||
fatal
"There was some error during install the application."
else
psdir
=
$prsdir
__check_play_script
"
$prescription
"
||
fatal
"We have no idea how to play
$prescription
(checked in
$psdir
and
$prsdir
)"
__epm_play_run
"
$prescription
"
--run
"
$@
"
||
fatal
"There was some error during run the script."
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