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
b0761cf6
Commit
b0761cf6
authored
Apr 02, 2024
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play: add support for run direct script
parent
e8e48215
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
epm-play
bin/epm-play
+24
-2
No files found.
bin/epm-play
View file @
b0761cf6
...
...
@@ -158,9 +158,9 @@ __check_play_script()
}
__epm_play_run
()
__epm_play_run
_script
()
{
local
script
=
"
$
psdir
/
$1
.sh
"
local
script
=
"
$
1
"
shift
local
addopt
...
...
@@ -173,6 +173,13 @@ __epm_play_run()
(
export
EPM_OPTIONS
=
"
$EPM_OPTIONS
$addopt
"
export
PATH
=
$SCPATH
;
docmd
$CMDSHELL
$bashopt
$script
"
$@
"
)
}
__epm_play_run
()
{
local
script
=
"
$psdir
/
$1
.sh"
shift
__epm_play_run_script
"
$script
"
"
$@
"
}
__epm_play_list_installed
()
{
local
i
...
...
@@ -257,11 +264,20 @@ Examples:
EOF
}
__epm_is_shell_script
()
{
local
script
=
"
$1
"
[
-x
"
$script
"
]
&&
rhas
"
$script
"
"
\.
sh$"
&&
head
-n1
"
$script
"
|
grep
-q
"^#!/bin/sh"
}
__epm_play_remove
()
{
local
prescription
for
prescription
in
$*
;
do
if
__epm_is_shell_script
"
$prescription
"
;
then
__epm_play_run_script
$prescription
--remove
continue
fi
if
__check_play_script
"
$prescription
"
;
then
__epm_play_run
$prescription
--remove
__remove_installed_app
"
$prescription
"
...
...
@@ -305,6 +321,12 @@ __epm_play_install_one()
local
prescription
=
"
$1
"
shift
if
__epm_is_shell_script
"
$prescription
"
;
then
# direct run play script
__epm_play_run_script
"
$prescription
"
--run
"
$@
"
||
fatal
"There was some error during install the application."
return
fi
if
__check_play_script
"
$prescription
"
;
then
#__is_app_installed "$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."
...
...
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