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
def6b465
Commit
def6b465
authored
Aug 06, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play: restore separated installed app list
parent
02e4c644
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
epm-play
bin/epm-play
+16
-14
No files found.
bin/epm-play
View file @
def6b465
...
...
@@ -21,9 +21,14 @@
epm_vardir
=
/var/lib/eepm
__check_installed_app
()
{
[
-s
$epm_vardir
/installed-app
]
||
return
1
grep
-q
--
"^
$1
\$
"
$epm_vardir
/installed-app
}
__save_installed_app
()
{
return
0
# stub
[
-d
"
$epm_vardir
"
]
||
return
0
__check_installed_app
"
$1
"
&&
return
0
echo
"
$1
"
| sudorun
tee
-a
$epm_vardir
/installed-app
>
/dev/null
...
...
@@ -31,7 +36,6 @@ __save_installed_app()
__remove_installed_app
()
{
return
0
# stub
[
-s
$epm_vardir
/installed-app
]
||
return
0
local
i
for
i
in
$*
;
do
...
...
@@ -40,6 +44,13 @@ __remove_installed_app()
return
0
}
__is_app_installed
()
{
__run_script
"
$1
"
--installed
"
$2
"
return
}
__run_script
()
{
local
script
=
"
$psdir
/
$1
.sh"
...
...
@@ -54,14 +65,6 @@ __get_app_package()
__run_script
"
$1
"
--package-name
"
$2
"
2>/dev/null
}
__check_installed_app
()
{
__run_script
"
$1
"
--installed
"
$2
"
return
[
-s
$epm_vardir
/installed-app
]
||
return
1
grep
-q
--
"^
$1
\$
"
$epm_vardir
/installed-app
}
__list_all_app
()
...
...
@@ -215,7 +218,6 @@ fi
if
[
"
$1
"
=
"--remove"
]
||
[
"
$1
"
=
"remove"
]
;
then
shift
#__check_installed_app "$1" || warning "$1 is not installed"
prescription
=
"
$1
"
shift
if
__check_play_script
"
$prescription
"
;
then
...
...
@@ -251,7 +253,7 @@ if [ "$1" = "--update" ] ; then
if
[
-z
"
$1
"
]
;
then
fatal
"run --update with 'all' or a project name"
fi
__
check_installed_app
"
$1
"
||
fatal
"
$1
is not installed"
__
is_app_installed
"
$1
"
||
fatal
"
$1
is not installed"
prescription
=
"
$1
"
shift
__epm_play_run
$prescription
--update
"
$@
"
...
...
@@ -260,7 +262,7 @@ fi
if
[
"
$1
"
=
"--installed"
]
||
[
"
$1
"
=
"installed"
]
;
then
shift
__
check_installed_app
"
$1
"
"
$2
"
__
is_app_installed
"
$1
"
"
$2
"
#[ -n "$quiet" ] && exit
exit
fi
...
...
@@ -303,7 +305,7 @@ prescription="$1"
shift
if
__check_play_script
"
$prescription
"
;
then
#__
check_installed_app
"$prescription" && info "$$prescription is already installed (use --remove to remove)" && exit 1
#__
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."
else
psdir
=
$prsdir
...
...
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