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
Nurlan
eepm
Commits
ceccd3ff
Commit
ceccd3ff
authored
Dec 16, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add common function set_distro_info and use it
parent
b4fe5ef1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
13 deletions
+11
-13
epm-sh-functions
bin/epm-sh-functions
+10
-6
serv
bin/serv
+1
-7
No files found.
bin/epm-sh-functions
View file @
ceccd3ff
...
...
@@ -500,23 +500,27 @@ get_help()
done
}
# FIXME: detect if not recognized
set_pm_type
()
# TODO: get all info by one request (too slow)
set_distro_info
()
{
local
CMD
# use external distro_info if internal one is missed
DISTRVENDOR
=
$PROGDIR
/distr_info
[
-x
$DISTRVENDOR
]
||
DISTRVENDOR
=
distro_info
export
DISTRVENDOR
# Fill for use: PMTYPE, DISTRNAME, DISTRVERSION, PKGFORMAT, PKGVENDOR, RPMVENDOR
[
-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
)
"
}
# FIXME: detect if not recognized
set_pm_type
()
{
local
CMD
set_distro_info
set_target_pkg_env
# override package manager detection result
...
...
bin/serv
View file @
ceccd3ff
...
...
@@ -48,13 +48,7 @@ set_service_type()
{
local
CMD
# use external distro_info if internal one is missed
DISTRVENDOR
=
$PROGDIR
/distr_info
[
-x
$DISTRVENDOR
]
||
DISTRVENDOR
=
distro_info
# Fill for use: PMTYPE, DISTRNAME, DISTRVERSION, PKGFORMAT, PKGVENDOR, RPMVENDOR
[
-n
"
$DISTRNAME
"
]
||
DISTRNAME
=
$(
$DISTRVENDOR
-d
)
||
fatal
"Can't get distro name from
$DISTRVENDOR
."
[
-n
"
$DISTRVERSION
"
]
||
DISTRVERSION
=
$(
$DISTRVENDOR
-v
)
set_distro_info
set_target_pkg_env
case
$DISTRNAME
in
...
...
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