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
96d3aebc
Commit
96d3aebc
authored
Jan 09, 2026
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit packed 3.64.49
parent
0c94f645
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
95 additions
and
16 deletions
+95
-16
epm.sh
packed/epm.sh
+0
-0
serv.sh
packed/serv.sh
+95
-16
No files found.
packed/epm.sh
View file @
96d3aebc
This diff is collapsed.
Click to expand it.
packed/serv.sh
View file @
96d3aebc
...
...
@@ -34,7 +34,7 @@ SHAREDIR=$PROGDIR
# will replaced with /etc/eepm during install
CONFIGDIR
=
$PROGDIR
/../etc
EPMVERSION
=
"3.64.4
8
"
EPMVERSION
=
"3.64.4
9
"
# package, single (file), pipe, git
EPMMODE
=
"package"
...
...
@@ -506,8 +506,8 @@ set_sudo()
return
"
$SUDO_TESTED
"
fi
# if
input is a console and stderr is a console
if
inputisatty
&&
isatty2
;
then
# if
/dev/tty is available and stderr is a console, sudo can ask for password
if
[
-r
/dev/tty
]
&&
[
-w
/dev/tty
]
&&
isatty2
;
then
if
!
$SUDO_CMD
-n
true
;
then
info
"Please enter sudo user password to use sudo for all privileged operations in the current session."
>
&2
if
!
$SUDO_CMD
-l
>
/dev/null
;
then
...
...
@@ -715,10 +715,16 @@ esu()
fi
}
__escape_regex_special
()
{
# escape: \ . ^ $ | ( ) [ ] { } +
echo
"
$1
"
|
sed
-e
's|[\\.^$|(){}+]|\\&|g'
-e
's|\[|\\[|g'
-e
's|\]|\\]|g'
}
__convert_glob__to_regexp
()
{
# translate glob to regexp
echo
"
$1
"
|
sed
-e
"s|
\*
|.*|g"
-e
"s|?|.|g"
#
first escape regex special chars, then
translate glob to regexp
__escape_regex_special
"
$1
"
|
sed
-e
"s|
\*
|.*|g"
-e
"s|?|.|g"
}
regexp_subst
()
...
...
@@ -846,19 +852,36 @@ calc_sha256sum()
sha256sum
"
$1
"
|
awk
'{print $1}'
}
print_sha256sum
()
get_checksum_value
()
{
if
!
is_command
sha256sum
;
then
info
"sha256sum is missed, can't print sha256 for packages..."
return
fi
echo
"
$1
"
|
sed
's/^[^:]*://'
}
calc_checksum
()
{
local
spec
=
"
$1
"
local
file
=
"
$2
"
case
"
${
spec
%%
:
*
}
"
in
md5|md5hash
)
md5sum
"
$file
"
;;
sha1|sha1hash
)
sha1sum
"
$file
"
;;
sha512|sha512hash
)
sha512sum
"
$file
"
;;
*
)
sha256sum
"
$file
"
;;
esac
|
awk
'{print $1}'
}
print_sha256sum
()
{
local
checksum
=
''
if
[
"
$1
"
=
"--checksum"
]
;
then
checksum
=
"
$2
"
shift
2
pcs
=
"
$(
calc_sha256sum
"
$1
"
)
"
[
"
$checksum
"
=
"
$pcs
"
]
||
fatal
"Checksum verification failed. Awaited checksum:
$checksum
, package checksum:
$pcs
"
local
expected
=
"
$(
get_checksum_value
"
$checksum
"
)
"
local
pcs
=
"
$(
calc_checksum
"
$checksum
"
"
$1
"
)
"
[
"
$expected
"
=
"
$pcs
"
]
||
fatal
"Checksum verification failed (
${
checksum
%%
:
*
}
). Awaited:
$expected
, got:
$pcs
"
fi
local
files
=
"
$*
"
...
...
@@ -887,7 +910,7 @@ get_json_value()
toutput
=
"
$(
fetch_url
"
$1
"
)
"
||
return
echo
"
$toutput
"
| parse_json_value
"
$2
"
else
[
-s
"
$1
"
]
||
fatal
"File
$1
is miss
ed, can't get json
"
[
-s
"
$1
"
]
||
fatal
"File
$1
is miss
ing, can't get JSON
"
parse_json_value
"
$2
"
<
"
$1
"
fi
}
...
...
@@ -906,7 +929,7 @@ get_json_values()
toutput
=
"
$(
fetch_url
"
$1
"
)
"
||
return
echo
"
$toutput
"
| parse_json_values
"
$2
"
else
[
-s
"
$1
"
]
||
fatal
"File
$1
is miss
ed, can't get json
"
[
-s
"
$1
"
]
||
fatal
"File
$1
is miss
ing, can't get JSON
"
parse_json_values
"
$2
"
<
"
$1
"
fi
}
...
...
@@ -1220,7 +1243,9 @@ has_space()
is_url
()
{
echo
"
$1
"
|
grep
-q
"^[filehtps]*:/"
echo
"
$1
"
|
grep
-qE
"^(file|ftp|http|https|rsync):/"
&&
return
0
# SSH/rsync URL: host:/path or user@host:/path (but not scheme://)
echo
"
$1
"
|
grep
-qE
'^[^:]+:/'
&&
!
echo
"
$1
"
|
grep
-q
"://"
}
if
a
=
type
-a
type
2>/dev/null
>
/dev/null
;
then
...
...
@@ -1270,6 +1295,34 @@ subst()
}
fi
__epm_suggest_similar_packages
()
{
local
pkg
=
"
$1
"
local
cache
=
"
$epm_vardir
/available-packages"
# need cache file
[
-s
"
$cache
"
]
||
return
1
# need fzf for fuzzy search
is_command fzf
||
return
1
local
similar
similar
=
"
$(
fzf
-f
"
$pkg
"
<
"
$cache
"
2>/dev/null |
head
-3
)
"
[
-z
"
$similar
"
]
&&
return
1
echo
""
echo
"Perhaps you meant:"
echo
"
$similar
"
|
sed
's/^/ /'
}
__epm_suggest_similar_packages_by_list
()
{
local
pkg
for
pkg
in
"
$@
"
;
do
__epm_suggest_similar_packages
"
$pkg
"
done
}
check_core_commands
()
{
#which which >/dev/null || fatal "Can't find which command (which or debianutils package is missed?)"
...
...
@@ -1624,7 +1677,13 @@ serv_log()
case
$SERVICETYPE
in
systemd
)
sudocmd journalctl
-b
-u
"
$SERVICE
"
"
$@
"
if
[
"
$1
"
=
"-f"
]
;
then
shift
sudocmd journalctl
-f
-u
"
$SERVICE
"
"
$@
"
else
# -e to jump to end of log
sudocmd journalctl
-e
-u
"
$SERVICE
"
"
$@
"
fi
;;
*
)
case
$BASEDISTRNAME
in
...
...
@@ -3465,8 +3524,28 @@ check_option()
return
0
}
# Check if daemon-reload is needed and run it automatically
check_daemon_reload
()
{
local
service
=
"
$1
"
[
-z
"
$service
"
]
&&
return
0
# Check NeedDaemonReload property (read-only, no sudo needed)
if
$SYSTEMCTL
$SYSTEMCTL_ARGS
show
-p
NeedDaemonReload
"
$service
"
2>/dev/null |
grep
-q
"NeedDaemonReload=yes"
;
then
info
"Unit file changed, running daemon-reload..."
$SYSTEMCTL_RUNNER
$SYSTEMCTL
$SYSTEMCTL_ARGS
daemon-reload
fi
}
run_systemctl
()
{
local
cmd
=
"
$1
"
local
service
=
"
$2
"
# Auto daemon-reload before start/restart/reload
case
"
$cmd
"
in
start|restart|reload|try-restart
)
check_daemon_reload
"
$service
"
;;
esac
$SYSTEMCTL_RUNNER
$SYSTEMCTL
$SYSTEMCTL_ARGS
"
$@
"
}
...
...
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