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
7263d396
Commit
7263d396
authored
Apr 30, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimization: use eval distr_info --print-eepm-env instead of separated calls
parent
d63a5430
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
21 deletions
+8
-21
epm-sh-functions
bin/epm-sh-functions
+8
-20
serv
bin/serv
+0
-1
No files found.
bin/epm-sh-functions
View file @
7263d396
...
...
@@ -104,17 +104,6 @@ echon()
}
# Used DISTRNAME
set_target_pkg_env
()
{
[
-n
"
$DISTRNAME
"
]
||
fatal
"Missing DISTRNAME in set_target_pkg_env."
local
ver
=
"
$DISTRVERSION
"
[
-n
"
$ver
"
]
&&
ver
=
"/
$ver
"
PKGFORMAT
=
$(
$DISTRVENDOR
-p
"
$DISTRNAME$ver
"
)
PKGVENDOR
=
$(
$DISTRVENDOR
-s
"
$DISTRNAME$ver
"
)
RPMVENDOR
=
$(
$DISTRVENDOR
-n
"
$DISTRNAME$ver
"
)
}
# Print command line and run command line
showcmd
()
{
...
...
@@ -682,13 +671,14 @@ set_distro_info()
[
-x
$DISTRVENDOR
]
||
DISTRVENDOR
=
distro_info
export
DISTRVENDOR
[
-n
"
$DISTRNAME
"
]
||
DISTRNAME
=
$(
$DISTRVENDOR
-d
)
||
fatal
"Can't get distro name."
[
-n
"
$DISTRVERSION
"
]
||
DISTRVERSION
=
$(
$DISTRVENDOR
-v
)
if
[
-z
"
$DISTRARCH
"
]
;
then
DISTRARCH
=
$(
$DISTRVENDOR
--distro-arch
)
fi
DISTRCONTROL
=
"
$(
$DISTRVENDOR
-y
)
"
[
-n
"
$BASEDISTRNAME
"
]
||
BASEDISTRNAME
=
$(
$DISTRVENDOR
-s
)
# export pack of variables:
# BASEDISTRNAME
# DISTRNAME
# DISTRVERSION
# DISTRARCH
# DISTRCONTROL
# PMTYPE
eval
$(
$DISTRVENDOR
--print-eepm-env
)
[
-n
"
$TMPDIR
"
]
||
TMPDIR
=
"/tmp"
# TODO: improve BIGTMPDIR conception
...
...
@@ -703,7 +693,6 @@ set_pm_type()
{
local
CMD
set_distro_info
set_target_pkg_env
# override package manager detection result
if
[
-n
"
$EPM_BACKEND
"
]
;
then
...
...
@@ -716,7 +705,6 @@ if [ -n "$FORCEPM" ] ; then
return
fi
PMTYPE
=
"
$(
$DISTRVENDOR
-g
$DISTRNAME
/
$DISTRVERSION
)
"
}
is_active_systemd
()
...
...
bin/serv
View file @
7263d396
...
...
@@ -72,7 +72,6 @@ set_service_type()
local
CMD
set_distro_info
set_target_pkg_env
case
"
$DISTRCONTROL
"
in
sysvinit
)
...
...
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