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
687e3f19
Commit
687e3f19
authored
Apr 07, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit packed 3.17.0
parent
4f790507
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
24 deletions
+73
-24
epm.sh
packed/epm.sh
+71
-23
serv.sh
packed/serv.sh
+2
-1
No files found.
packed/epm.sh
View file @
687e3f19
...
@@ -2164,11 +2164,11 @@ __download_pkg_urls()
...
@@ -2164,11 +2164,11 @@ __download_pkg_urls()
cd
$tmppkg
||
fatal
cd
$tmppkg
||
fatal
if
docmd eget
--latest
"
$url
"
;
then
if
docmd eget
--latest
"
$url
"
;
then
local
i
local
i
for
i
in
$(
basename
$url
)
;
do
# use downloaded file
[
-s
"
$tmppkg
/
$i
"
]
||
continue
i
=
$(
echo
*
.
*)
pkg_files
=
"
$pkg_files
$tmppkg
/
$i
"
[
-s
"
$tmppkg
/
$i
"
]
||
continue
to_remove_pkg_files
=
"
$to_remove_
pkg_files
$tmppkg
/
$i
"
pkg_files
=
"
$
pkg_files
$tmppkg
/
$i
"
done
to_remove_pkg_files
=
"
$to_remove_pkg_files
$tmppkg
/
$i
"
else
else
warning
"Failed to download
$url
, ignoring"
warning
"Failed to download
$url
, ignoring"
fi
fi
...
@@ -3640,6 +3640,7 @@ epm_vardir=/var/lib/eepm
...
@@ -3640,6 +3640,7 @@ epm_vardir=/var/lib/eepm
__save_installed_app
()
__save_installed_app
()
{
{
return
0
# stub
[
-d
"
$epm_vardir
"
]
||
return
0
[
-d
"
$epm_vardir
"
]
||
return
0
__check_installed_app
"
$1
"
&&
return
0
__check_installed_app
"
$1
"
&&
return
0
echo
"
$1
"
| sudorun
tee
-a
$epm_vardir
/installed-app
>
/dev/null
echo
"
$1
"
| sudorun
tee
-a
$epm_vardir
/installed-app
>
/dev/null
...
@@ -3647,6 +3648,7 @@ __save_installed_app()
...
@@ -3647,6 +3648,7 @@ __save_installed_app()
__remove_installed_app
()
__remove_installed_app
()
{
{
return
0
# stub
[
-s
$epm_vardir
/installed-app
]
||
return
0
[
-s
$epm_vardir
/installed-app
]
||
return
0
local
i
local
i
for
i
in
$*
;
do
for
i
in
$*
;
do
...
@@ -3657,19 +3659,69 @@ __remove_installed_app()
...
@@ -3657,19 +3659,69 @@ __remove_installed_app()
__check_installed_app
()
__check_installed_app
()
{
{
local
script
=
"
$psdir
/
$1
.sh"
[
-x
"
$script
"
]
||
return
$script
--installed
return
[
-s
$epm_vardir
/installed-app
]
||
return
1
[
-s
$epm_vardir
/installed-app
]
||
return
1
grep
-q
--
"^
$1
\$
"
$epm_vardir
/installed-app
grep
-q
--
"^
$1
\$
"
$epm_vardir
/installed-app
}
}
__list_all_app
()
{
for
i
in
$psdir
/
*
.sh
;
do
local
name
=
$(
basename
$i
.sh
)
[
-n
"
$IGNOREi586
"
]
&&
rhas
"
$name
"
"^i586-"
&&
continue
rhas
"
$name
"
"^common"
&&
continue
echo
"
$name
"
done
}
__list_all_packages
()
{
local
name
for
name
in
$(
__list_all_app
)
;
do
__get_app_package
$name
done
}
__list_app_packages_table
()
{
local
name
for
name
in
$(
__list_all_app
)
;
do
echo
"
$(
__get_app_package
$name
)
$name
"
done
}
__list_installed_app
()
__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
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
()
__get_app_description
()
{
{
[
-x
"
$1
"
]
||
return
local
script
=
"
$psdir
/
$1
.sh"
$1
--description
2>/dev/null
[
-x
"
$script
"
]
||
return
$script
--description
2>/dev/null
}
}
__check_play_script
()
__check_play_script
()
...
@@ -3712,8 +3764,8 @@ __epm_play_list_installed()
...
@@ -3712,8 +3764,8 @@ __epm_play_list_installed()
exit
exit
fi
fi
[
-n
"
$quiet
"
]
||
echo
"Installed applications:"
[
-n
"
$quiet
"
]
||
echo
"Installed applications:"
for
i
in
$(
__list_installed_app
|
sort
)
;
do
for
i
in
$(
__list_installed_app
)
;
do
local
desc
=
"
$(
__get_app_description
$
psdir
/
$i
.sh
)
"
local
desc
=
"
$(
__get_app_description
$
i
)
"
[
-n
"
$desc
"
]
||
continue
[
-n
"
$desc
"
]
||
continue
[
-n
"
$quiet
"
]
||
echo
-n
" "
[
-n
"
$quiet
"
]
||
echo
-n
" "
printf
"%-20s - %s
\n
"
"
$i
"
"
$desc
"
printf
"%-20s - %s
\n
"
"
$i
"
"
$desc
"
...
@@ -3729,22 +3781,16 @@ __epm_play_list()
...
@@ -3729,22 +3781,16 @@ __epm_play_list()
[
"
$(
$DISTRVENDOR
-a
)
"
=
"x86_64"
]
&&
IGNOREi586
=
''
||
IGNOREi586
=
1
[
"
$(
$DISTRVENDOR
-a
)
"
=
"x86_64"
]
&&
IGNOREi586
=
''
||
IGNOREi586
=
1
if
[
-n
"
$short
"
]
;
then
if
[
-n
"
$short
"
]
;
then
for
i
in
$psdir
/
*
.sh
;
do
for
i
in
$(
__list_all_app
)
;
do
local
name
=
$(
basename
$i
.sh
)
echo
"
$i
"
[
-n
"
$IGNOREi586
"
]
&&
rhas
"
$name
"
"^i586-"
&&
continue
rhas
"
$name
"
"^common"
&&
continue
echo
"
$name
"
done
done
exit
exit
fi
fi
for
i
in
$
psdir
/
*
.sh
;
do
for
i
in
$
(
__list_all_app
)
;
do
local
desc
=
"
$(
__get_app_description
$i
)
"
local
desc
=
"
$(
__get_app_description
$i
)
"
[
-n
"
$desc
"
]
||
continue
[
-n
"
$desc
"
]
||
continue
local
name
=
$(
basename
$i
.sh
)
[
-n
"
$IGNOREi586
"
]
&&
rhas
"
$name
"
"^i586-"
&&
continue
rhas
"
$name
"
"^common"
&&
continue
[
-n
"
$quiet
"
]
||
echo
-n
" "
[
-n
"
$quiet
"
]
||
echo
-n
" "
printf
"%-20s - %s
\n
"
"
$
name
"
"
$desc
"
printf
"%-20s - %s
\n
"
"
$
i
"
"
$desc
"
done
done
}
}
...
@@ -3801,7 +3847,7 @@ if [ "$1" = "--update" ] ; then
...
@@ -3801,7 +3847,7 @@ if [ "$1" = "--update" ] ; then
RES
=
1
RES
=
1
continue
continue
fi
fi
__epm_play_run
$prescription
--
run
"
$@
"
||
RES
=
$?
__epm_play_run
$prescription
--
update
"
$@
"
||
RES
=
$?
done
done
exit
$RES
exit
$RES
fi
fi
...
@@ -3811,7 +3857,7 @@ if [ "$1" = "--update" ] ; then
...
@@ -3811,7 +3857,7 @@ if [ "$1" = "--update" ] ; then
__check_installed_app
"
$1
"
||
fatal
"
$1
is not installed"
__check_installed_app
"
$1
"
||
fatal
"
$1
is not installed"
prescription
=
"
$1
"
prescription
=
"
$1
"
shift
shift
__epm_play_run
$prescription
--
run
"
$@
"
__epm_play_run
$prescription
--
update
"
$@
"
exit
exit
fi
fi
...
@@ -9024,6 +9070,7 @@ if distro altlinux-release ; then
...
@@ -9024,6 +9070,7 @@ if distro altlinux-release ; then
elif
has
"ALT p9.* p9 "
;
then
DISTRIB_RELEASE
=
"p9"
elif
has
"ALT p9.* p9 "
;
then
DISTRIB_RELEASE
=
"p9"
elif
has
"ALT 9 SP "
;
then
DISTRIB_RELEASE
=
"c9"
elif
has
"ALT 9 SP "
;
then
DISTRIB_RELEASE
=
"c9"
elif
has
"ALT c9f1"
;
then
DISTRIB_RELEASE
=
"c9f1"
elif
has
"ALT c9f1"
;
then
DISTRIB_RELEASE
=
"c9f1"
elif
has
"ALT MED72 "
;
then
DISTRIB_RELEASE
=
"p8"
elif
has
"ALT 8 SP "
;
then
DISTRIB_RELEASE
=
"c8"
elif
has
"ALT 8 SP "
;
then
DISTRIB_RELEASE
=
"c8"
elif
has
"ALT c8.2 "
;
then
DISTRIB_RELEASE
=
"c8.2"
elif
has
"ALT c8.2 "
;
then
DISTRIB_RELEASE
=
"c8.2"
elif
has
"ALT c8.1 "
;
then
DISTRIB_RELEASE
=
"c8.1"
elif
has
"ALT c8.1 "
;
then
DISTRIB_RELEASE
=
"c8.1"
...
@@ -10474,7 +10521,7 @@ Examples:
...
@@ -10474,7 +10521,7 @@ Examples:
print_version
()
print_version
()
{
{
echo
"EPM package manager version 3.1
6.1
0 https://wiki.etersoft.ru/Epm"
echo
"EPM package manager version 3.1
7.
0 https://wiki.etersoft.ru/Epm"
echo
"Running on
$(
$DISTRVENDOR
-e
)
('
$PMTYPE
' package manager uses '
$PKGFORMAT
' package format)"
echo
"Running on
$(
$DISTRVENDOR
-e
)
('
$PMTYPE
' package manager uses '
$PKGFORMAT
' package format)"
echo
"Copyright (c) Etersoft 2012-2021"
echo
"Copyright (c) Etersoft 2012-2021"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
...
@@ -10484,7 +10531,7 @@ print_version()
...
@@ -10484,7 +10531,7 @@ print_version()
Usage
=
"Usage: epm [options] <command> [package name(s), package files]..."
Usage
=
"Usage: epm [options] <command> [package name(s), package files]..."
Descr
=
"epm - EPM package manager"
Descr
=
"epm - EPM package manager"
EPMVERSION
=
3.1
6.1
0
EPMVERSION
=
3.1
7.
0
verbose
=
$EPM_VERBOSE
verbose
=
$EPM_VERBOSE
quiet
=
quiet
=
nodeps
=
nodeps
=
...
@@ -10790,6 +10837,7 @@ check_option()
...
@@ -10790,6 +10837,7 @@ check_option()
{
{
case
$1
in
case
$1
in
-v
|
--version
)
# HELPOPT: print version
-v
|
--version
)
# HELPOPT: print version
[
-n
"
$epm_cmd
"
]
&&
return
1
print_version
print_version
exit
0
exit
0
;;
;;
...
...
packed/serv.sh
View file @
687e3f19
...
@@ -1557,6 +1557,7 @@ if distro altlinux-release ; then
...
@@ -1557,6 +1557,7 @@ if distro altlinux-release ; then
elif
has
"ALT p9.* p9 "
;
then
DISTRIB_RELEASE
=
"p9"
elif
has
"ALT p9.* p9 "
;
then
DISTRIB_RELEASE
=
"p9"
elif
has
"ALT 9 SP "
;
then
DISTRIB_RELEASE
=
"c9"
elif
has
"ALT 9 SP "
;
then
DISTRIB_RELEASE
=
"c9"
elif
has
"ALT c9f1"
;
then
DISTRIB_RELEASE
=
"c9f1"
elif
has
"ALT c9f1"
;
then
DISTRIB_RELEASE
=
"c9f1"
elif
has
"ALT MED72 "
;
then
DISTRIB_RELEASE
=
"p8"
elif
has
"ALT 8 SP "
;
then
DISTRIB_RELEASE
=
"c8"
elif
has
"ALT 8 SP "
;
then
DISTRIB_RELEASE
=
"c8"
elif
has
"ALT c8.2 "
;
then
DISTRIB_RELEASE
=
"c8.2"
elif
has
"ALT c8.2 "
;
then
DISTRIB_RELEASE
=
"c8.2"
elif
has
"ALT c8.1 "
;
then
DISTRIB_RELEASE
=
"c8.1"
elif
has
"ALT c8.1 "
;
then
DISTRIB_RELEASE
=
"c8.1"
...
@@ -3075,7 +3076,7 @@ print_version()
...
@@ -3075,7 +3076,7 @@ print_version()
local
on_text
=
"(host system)"
local
on_text
=
"(host system)"
local
virt
=
"
$(
$DISTRVENDOR
-i
)
"
local
virt
=
"
$(
$DISTRVENDOR
-i
)
"
[
"
$virt
"
=
"(unknown)"
]
||
[
"
$virt
"
=
"(host system)"
]
||
on_text
=
"(under
$virt
)"
[
"
$virt
"
=
"(unknown)"
]
||
[
"
$virt
"
=
"(host system)"
]
||
on_text
=
"(under
$virt
)"
echo
"Service manager version 3.1
6.1
0 https://wiki.etersoft.ru/Epm"
echo
"Service manager version 3.1
7.
0 https://wiki.etersoft.ru/Epm"
echo
"Running on
$(
$DISTRVENDOR
-e
)
$on_text
with
$SERVICETYPE
"
echo
"Running on
$(
$DISTRVENDOR
-e
)
$on_text
with
$SERVICETYPE
"
echo
"Copyright (c) Etersoft 2012-2021"
echo
"Copyright (c) Etersoft 2012-2021"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
...
...
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