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
f5057996
Commit
f5057996
authored
Apr 07, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit packed 3.16.10
parent
38bf919b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
204 additions
and
40 deletions
+204
-40
epm.sh
packed/epm.sh
+104
-21
serv.sh
packed/serv.sh
+100
-19
No files found.
packed/epm.sh
View file @
f5057996
...
@@ -3647,7 +3647,7 @@ __save_installed_app()
...
@@ -3647,7 +3647,7 @@ __save_installed_app()
__remove_installed_app
()
__remove_installed_app
()
{
{
[
-
d
"
$epm_vardir
"
]
||
return
0
[
-
s
$epm_vardir
/installed-app
]
||
return
0
local
i
local
i
for
i
in
$*
;
do
for
i
in
$*
;
do
sudorun
sed
-i
"/^
$i$/
d"
$epm_vardir
/installed-app
sudorun
sed
-i
"/^
$i$/
d"
$epm_vardir
/installed-app
...
@@ -3694,6 +3694,8 @@ __epm_play_run()
...
@@ -3694,6 +3694,8 @@ __epm_play_run()
set_sudo
set_sudo
export
SUDO
export
SUDO
[
-n
"
$non_interactive
"
]
&&
export
EPM_AUTO
=
"--auto"
local
bashopt
=
''
local
bashopt
=
''
[
-n
"
$verbose
"
]
&&
bashopt
=
'-x'
&&
export
EPM_VERBOSE
=
"
$verbose
"
[
-n
"
$verbose
"
]
&&
bashopt
=
'-x'
&&
export
EPM_VERBOSE
=
"
$verbose
"
#info "Running $($script --description 2>/dev/null) ..."
#info "Running $($script --description 2>/dev/null) ..."
...
@@ -8988,14 +8990,6 @@ DISTRIB_ID=""
...
@@ -8988,14 +8990,6 @@ DISTRIB_ID=""
DISTRIB_RELEASE
=
""
DISTRIB_RELEASE
=
""
DISTRIB_CODENAME
=
""
DISTRIB_CODENAME
=
""
# Default with LSB
if
distro lsb-release
;
then
DISTRIB_ID
=
$(
cat
$DISTROFILE
| get_var DISTRIB_ID
)
DISTRIB_RELEASE
=
$(
cat
$DISTROFILE
| get_var DISTRIB_RELEASE
)
DISTRIB_CODENAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_CODENAME
)
PRETTY_NAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_DESCRIPTION
)
fi
# Next default by /etc/os-release
# Next default by /etc/os-release
# https://www.freedesktop.org/software/systemd/man/os-release.html
# https://www.freedesktop.org/software/systemd/man/os-release.html
if
distro os-release
;
then
if
distro os-release
;
then
...
@@ -9008,6 +9002,13 @@ if distro os-release ; then
...
@@ -9008,6 +9002,13 @@ if distro os-release ; then
# set by os-release:
# set by os-release:
#PRETTY_NAME
#PRETTY_NAME
VENDOR_ID
=
"
$ID
"
VENDOR_ID
=
"
$ID
"
DISTRIB_FULL_RELEASE
=
$DISTRIB_RELEASE
DISTRIB_RELEASE
=
$(
echo
$DISTRIB_RELEASE
|
sed
-e
"s/
\.
[0-9]
$/
/g"
)
elif
distro lsb-release
;
then
DISTRIB_ID
=
$(
cat
$DISTROFILE
| get_var DISTRIB_ID
)
DISTRIB_RELEASE
=
$(
cat
$DISTROFILE
| get_var DISTRIB_RELEASE
)
DISTRIB_CODENAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_CODENAME
)
PRETTY_NAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_DESCRIPTION
)
fi
fi
# ALT Linux based
# ALT Linux based
...
@@ -9598,12 +9599,12 @@ esac
...
@@ -9598,12 +9599,12 @@ esac
internal_tools_eget
()
internal_tools_eget
()
{
{
# eget - simply shell on wget for loading directories over http (wget does not support wildcard for http)
# eget - simply shell on wget for loading directories over http (wget does not support wildcard for http)
#
Example u
se:
#
U
se:
# eget http://ftp.altlinux.ru/pub/security/ssl/*
# eget http://ftp.altlinux.ru/pub/security/ssl/*
#
#
# Copyright (C) 2014-2014, 2016, 2020 Etersoft
# Copyright (C) 2014-2014, 2016, 2020
, 2022
Etersoft
# Copyright (C) 2014 Daniil Mikhailov <danil@etersoft.ru>
# Copyright (C) 2014 Daniil Mikhailov <danil@etersoft.ru>
# Copyright (C) 2016-2017, 2020 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2016-2017, 2020
, 2022
Vitaly Lipatov <lav@etersoft.ru>
#
#
# This program is free software: you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# it under the terms of the GNU Affero General Public License as published by
...
@@ -9625,8 +9626,86 @@ fatal()
...
@@ -9625,8 +9626,86 @@ fatal()
exit
1
exit
1
}
}
# copied from eepm project
# copied from /etc/init.d/outformat (ALT Linux)
isatty
()
{
# Set a sane TERM required for tput
[
-n
"
$TERM
"
]
||
TERM
=
dumb
export
TERM
test
-t
1
}
isatty2
()
{
# check stderr
test
-t
2
}
check_tty
()
{
isatty
||
return
which tput
>
/dev/null 2>/dev/null
||
return
# FreeBSD does not support tput -S
echo
| tput
-S
>
/dev/null 2>/dev/null
||
return
[
-z
"
$USETTY
"
]
||
return
export
USETTY
=
1
}
:
${
BLACK
:
=0
}
${
RED
:
=1
}
${
GREEN
:
=2
}
${
YELLOW
:
=3
}
${
BLUE
:
=4
}
${
MAGENTA
:
=5
}
${
CYAN
:
=6
}
${
WHITE
:
=7
}
set_boldcolor
()
{
[
"
$USETTY
"
=
"1"
]
||
return
{
echo
bold
echo
setaf
$1
}
|tput
-S
}
restore_color
()
{
[
"
$USETTY
"
=
"1"
]
||
return
{
echo
op
;
# set Original color Pair.
echo
sgr0
;
# turn off all special graphics mode (bold in our case).
}
|tput
-S
}
echover
()
{
[
-n
"
$verbose
"
]
||
return
echo
"
$*
"
>
&2
}
# Print command line and run command line
showcmd
()
{
if
[
-z
"
$quiet
"
]
;
then
set_boldcolor
$GREEN
local
PROMTSIG
=
"
\$
"
[
"
$UID
"
=
0
]
&&
PROMTSIG
=
"#"
echo
"
$PROMTSIG
$@
"
restore_color
fi
>
&2
}
# Print command line and run command line
docmd
()
{
showcmd
"
$@
"
"
$@
"
}
check_tty
WGETQ
=
''
#-q
WGETQ
=
''
#-q
CURLQ
=
''
#-s
CURLQ
=
''
#-s
WGETOPTIONS
=
'--content-disposition'
CURLOPTIONS
=
'--remote-name --remote-header-name'
set_quiet
()
set_quiet
()
{
{
...
@@ -9647,15 +9726,19 @@ if [ -n "$WGET" ] ; then
...
@@ -9647,15 +9726,19 @@ if [ -n "$WGET" ] ; then
# put remote content to stdout
# put remote content to stdout
scat
()
scat
()
{
{
$WGET
$WGETQ
-O-
"
$1
"
docmd
$WGET
$WGETQ
-O-
"
$1
"
}
}
# download to default name of to $2
# download to default name of to $2
sget
()
sget
()
{
{
if
[
-n
"
$2
"
]
;
then
if
[
-n
"
$2
"
]
;
then
$WGET
$WGETQ
-O
"
$2
"
"
$1
"
docmd
$WGET
$WGETQ
$WGETOPTIONS
-O
"
$2
"
"
$1
"
else
else
$WGET
$WGETQ
"
$1
"
# TODO: поддержка rsync для известных хостов?
# Не качать, если одинаковый размер и дата
# -nc
# TODO: overwrite always
docmd
$WGET
$WGETQ
$WGETOPTIONS
"
$1
"
fi
fi
}
}
...
@@ -9671,9 +9754,9 @@ scat()
...
@@ -9671,9 +9754,9 @@ scat()
sget
()
sget
()
{
{
if
[
-n
"
$2
"
]
;
then
if
[
-n
"
$2
"
]
;
then
$CURL
-L
$CURLQ
--output
"
$2
"
"
$1
"
docmd
$CURL
-L
$CURLQ
$CURLOPTIONS
--output
"
$2
"
"
$1
"
else
else
$CURL
-L
$CURLQ
-O
"
$1
"
docmd
$CURL
-L
$CURLQ
$CURLOPTIONS
-O
"
$1
"
fi
fi
}
}
fi
fi
...
@@ -9722,12 +9805,12 @@ fi
...
@@ -9722,12 +9805,12 @@ fi
# -P support
# -P support
if
[
-z
"
$1
"
]
;
then
if
[
-z
"
$1
"
]
;
then
echo
"eget - wget like downloader"
>
&2
echo
"eget - wget like downloader
wrapper with wildcard support
"
>
&2
fatal
"Run
$0
--help to get help"
fatal
"Run
$0
--help to get help"
fi
fi
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
echo
"eget - wget like downloader with wildcard support in filename part of URL"
echo
"eget - wget like downloader w
rapper w
ith wildcard support in filename part of URL"
echo
"Usage: eget [-q] [-O target file] [--list] http://somesite.ru/dir/na*.log"
echo
"Usage: eget [-q] [-O target file] [--list] http://somesite.ru/dir/na*.log"
echo
echo
echo
"Options:"
echo
"Options:"
...
@@ -10391,7 +10474,7 @@ Examples:
...
@@ -10391,7 +10474,7 @@ Examples:
print_version
()
print_version
()
{
{
echo
"EPM package manager version 3.16.
9
https://wiki.etersoft.ru/Epm"
echo
"EPM package manager version 3.16.
10
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."
...
@@ -10401,7 +10484,7 @@ print_version()
...
@@ -10401,7 +10484,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.16.
9
EPMVERSION
=
3.16.
10
verbose
=
$EPM_VERBOSE
verbose
=
$EPM_VERBOSE
quiet
=
quiet
=
nodeps
=
nodeps
=
...
...
packed/serv.sh
View file @
f5057996
...
@@ -1523,14 +1523,6 @@ DISTRIB_ID=""
...
@@ -1523,14 +1523,6 @@ DISTRIB_ID=""
DISTRIB_RELEASE
=
""
DISTRIB_RELEASE
=
""
DISTRIB_CODENAME
=
""
DISTRIB_CODENAME
=
""
# Default with LSB
if
distro lsb-release
;
then
DISTRIB_ID
=
$(
cat
$DISTROFILE
| get_var DISTRIB_ID
)
DISTRIB_RELEASE
=
$(
cat
$DISTROFILE
| get_var DISTRIB_RELEASE
)
DISTRIB_CODENAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_CODENAME
)
PRETTY_NAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_DESCRIPTION
)
fi
# Next default by /etc/os-release
# Next default by /etc/os-release
# https://www.freedesktop.org/software/systemd/man/os-release.html
# https://www.freedesktop.org/software/systemd/man/os-release.html
if
distro os-release
;
then
if
distro os-release
;
then
...
@@ -1543,6 +1535,13 @@ if distro os-release ; then
...
@@ -1543,6 +1535,13 @@ if distro os-release ; then
# set by os-release:
# set by os-release:
#PRETTY_NAME
#PRETTY_NAME
VENDOR_ID
=
"
$ID
"
VENDOR_ID
=
"
$ID
"
DISTRIB_FULL_RELEASE
=
$DISTRIB_RELEASE
DISTRIB_RELEASE
=
$(
echo
$DISTRIB_RELEASE
|
sed
-e
"s/
\.
[0-9]
$/
/g"
)
elif
distro lsb-release
;
then
DISTRIB_ID
=
$(
cat
$DISTROFILE
| get_var DISTRIB_ID
)
DISTRIB_RELEASE
=
$(
cat
$DISTROFILE
| get_var DISTRIB_RELEASE
)
DISTRIB_CODENAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_CODENAME
)
PRETTY_NAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_DESCRIPTION
)
fi
fi
# ALT Linux based
# ALT Linux based
...
@@ -2133,12 +2132,12 @@ esac
...
@@ -2133,12 +2132,12 @@ esac
internal_tools_eget
()
internal_tools_eget
()
{
{
# eget - simply shell on wget for loading directories over http (wget does not support wildcard for http)
# eget - simply shell on wget for loading directories over http (wget does not support wildcard for http)
#
Example u
se:
#
U
se:
# eget http://ftp.altlinux.ru/pub/security/ssl/*
# eget http://ftp.altlinux.ru/pub/security/ssl/*
#
#
# Copyright (C) 2014-2014, 2016, 2020 Etersoft
# Copyright (C) 2014-2014, 2016, 2020
, 2022
Etersoft
# Copyright (C) 2014 Daniil Mikhailov <danil@etersoft.ru>
# Copyright (C) 2014 Daniil Mikhailov <danil@etersoft.ru>
# Copyright (C) 2016-2017, 2020 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2016-2017, 2020
, 2022
Vitaly Lipatov <lav@etersoft.ru>
#
#
# This program is free software: you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# it under the terms of the GNU Affero General Public License as published by
...
@@ -2160,8 +2159,86 @@ fatal()
...
@@ -2160,8 +2159,86 @@ fatal()
exit
1
exit
1
}
}
# copied from eepm project
# copied from /etc/init.d/outformat (ALT Linux)
isatty
()
{
# Set a sane TERM required for tput
[
-n
"
$TERM
"
]
||
TERM
=
dumb
export
TERM
test
-t
1
}
isatty2
()
{
# check stderr
test
-t
2
}
check_tty
()
{
isatty
||
return
which tput
>
/dev/null 2>/dev/null
||
return
# FreeBSD does not support tput -S
echo
| tput
-S
>
/dev/null 2>/dev/null
||
return
[
-z
"
$USETTY
"
]
||
return
export
USETTY
=
1
}
:
${
BLACK
:
=0
}
${
RED
:
=1
}
${
GREEN
:
=2
}
${
YELLOW
:
=3
}
${
BLUE
:
=4
}
${
MAGENTA
:
=5
}
${
CYAN
:
=6
}
${
WHITE
:
=7
}
set_boldcolor
()
{
[
"
$USETTY
"
=
"1"
]
||
return
{
echo
bold
echo
setaf
$1
}
|tput
-S
}
restore_color
()
{
[
"
$USETTY
"
=
"1"
]
||
return
{
echo
op
;
# set Original color Pair.
echo
sgr0
;
# turn off all special graphics mode (bold in our case).
}
|tput
-S
}
echover
()
{
[
-n
"
$verbose
"
]
||
return
echo
"
$*
"
>
&2
}
# Print command line and run command line
showcmd
()
{
if
[
-z
"
$quiet
"
]
;
then
set_boldcolor
$GREEN
local
PROMTSIG
=
"
\$
"
[
"
$UID
"
=
0
]
&&
PROMTSIG
=
"#"
echo
"
$PROMTSIG
$@
"
restore_color
fi
>
&2
}
# Print command line and run command line
docmd
()
{
showcmd
"
$@
"
"
$@
"
}
check_tty
WGETQ
=
''
#-q
WGETQ
=
''
#-q
CURLQ
=
''
#-s
CURLQ
=
''
#-s
WGETOPTIONS
=
'--content-disposition'
CURLOPTIONS
=
'--remote-name --remote-header-name'
set_quiet
()
set_quiet
()
{
{
...
@@ -2182,15 +2259,19 @@ if [ -n "$WGET" ] ; then
...
@@ -2182,15 +2259,19 @@ if [ -n "$WGET" ] ; then
# put remote content to stdout
# put remote content to stdout
scat
()
scat
()
{
{
$WGET
$WGETQ
-O-
"
$1
"
docmd
$WGET
$WGETQ
-O-
"
$1
"
}
}
# download to default name of to $2
# download to default name of to $2
sget
()
sget
()
{
{
if
[
-n
"
$2
"
]
;
then
if
[
-n
"
$2
"
]
;
then
$WGET
$WGETQ
-O
"
$2
"
"
$1
"
docmd
$WGET
$WGETQ
$WGETOPTIONS
-O
"
$2
"
"
$1
"
else
else
$WGET
$WGETQ
"
$1
"
# TODO: поддержка rsync для известных хостов?
# Не качать, если одинаковый размер и дата
# -nc
# TODO: overwrite always
docmd
$WGET
$WGETQ
$WGETOPTIONS
"
$1
"
fi
fi
}
}
...
@@ -2206,9 +2287,9 @@ scat()
...
@@ -2206,9 +2287,9 @@ scat()
sget
()
sget
()
{
{
if
[
-n
"
$2
"
]
;
then
if
[
-n
"
$2
"
]
;
then
$CURL
-L
$CURLQ
--output
"
$2
"
"
$1
"
docmd
$CURL
-L
$CURLQ
$CURLOPTIONS
--output
"
$2
"
"
$1
"
else
else
$CURL
-L
$CURLQ
-O
"
$1
"
docmd
$CURL
-L
$CURLQ
$CURLOPTIONS
-O
"
$1
"
fi
fi
}
}
fi
fi
...
@@ -2257,12 +2338,12 @@ fi
...
@@ -2257,12 +2338,12 @@ fi
# -P support
# -P support
if
[
-z
"
$1
"
]
;
then
if
[
-z
"
$1
"
]
;
then
echo
"eget - wget like downloader"
>
&2
echo
"eget - wget like downloader
wrapper with wildcard support
"
>
&2
fatal
"Run
$0
--help to get help"
fatal
"Run
$0
--help to get help"
fi
fi
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
echo
"eget - wget like downloader with wildcard support in filename part of URL"
echo
"eget - wget like downloader w
rapper w
ith wildcard support in filename part of URL"
echo
"Usage: eget [-q] [-O target file] [--list] http://somesite.ru/dir/na*.log"
echo
"Usage: eget [-q] [-O target file] [--list] http://somesite.ru/dir/na*.log"
echo
echo
echo
"Options:"
echo
"Options:"
...
@@ -2994,7 +3075,7 @@ print_version()
...
@@ -2994,7 +3075,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.16.
9
https://wiki.etersoft.ru/Epm"
echo
"Service manager version 3.16.
10
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