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
94de8466
Commit
94de8466
authored
Apr 30, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
distr_info: allow override distr via DISTRNAMEOVERRIDE or latest arg
parent
6027c226
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
20 deletions
+9
-20
distr_info
bin/distr_info
+9
-20
No files found.
bin/distr_info
View file @
94de8466
...
...
@@ -76,23 +76,14 @@ print_bug_report_url()
# allows x86_64/Distro/Version
override_distrib
()
{
if
[
-n
"
$1
"
]
;
then
local
name
=
"
$(
echo
"
$1
"
|
sed
-e
's|x86_64/||'
)
"
[
"
$name
"
=
"
$1
"
]
&&
DIST_ARCH
=
"x86"
||
DIST_ARCH
=
"x86_64"
DISTRIB_ID
=
"
$(
echo
"
$name
"
|
sed
-e
's|/.*||'
)
"
DISTRIB_RELEASE
=
"
$(
echo
"
$name
"
|
sed
-e
's|.*/||'
)
"
[
"
$DISTRIB_ID
"
=
"
$DISTRIB_RELEASE
"
]
&&
DISTRIB_RELEASE
=
''
else
if
[
-z
"
$DISTRNAME
"
]
;
then
return
fi
[
-n
"
$DISTRNAMEOVERRIDE
"
]
||
DISTRNAMEOVERRIDE
=
"
$1
"
[
-n
"
$DISTRNAMEOVERRIDE
"
]
||
return
# if predefined DISTRNAME and possible DISTRVERSION
DISTRIB_ID
=
"
$DISTRNAME
"
[
-n
"
$DISTRVERSION
"
]
&&
DISTRIB_RELEASE
=
"
$DISTRVERSION
"
[
-n
"
$DISTRARCH
"
]
&&
DIST_ARCH
=
"
$DISTRARCH
"
# export DISTRCONTROL="$(get_service_manager)"
fi
local
name
=
"
$(
echo
"
$DISTRNAMEOVERRIDE
"
|
sed
-e
's|x86_64/||'
)
"
[
"
$name
"
=
"
$DISTRNAMEOVERRIDE
"
]
&&
DIST_ARCH
=
"x86"
||
DIST_ARCH
=
"x86_64"
DISTRIB_ID
=
"
$(
echo
"
$name
"
|
sed
-e
's|/.*||'
)
"
DISTRIB_RELEASE
=
"
$(
echo
"
$name
"
|
sed
-e
's|.*/||'
)
"
[
"
$DISTRIB_ID
"
=
"
$DISTRIB_RELEASE
"
]
&&
DISTRIB_RELEASE
=
''
VENDOR_ID
=
''
PRETTY_NAME
=
"
$DISTRIB_ID
"
...
...
@@ -959,9 +950,7 @@ EOF
}
if
[
-n
"
$DISTRNAME
"
]
;
then
override_distrib
fi
override_distrib
"
$DISTRNAMEOVERRIDE
"
if
[
-n
"
$*
"
]
;
then
eval
lastarg
=
\$
{
$#}
...
...
@@ -977,7 +966,7 @@ if [ -n "$*" ] ; then
fi
# if without override
if
[
-z
"
$DISTRIB_ID
"
]
&&
[
-z
"
$DISTRNAME
"
]
;
then
if
[
-z
"
$DISTRIB_ID
"
]
;
then
fill_distr_info
[
-n
"
$DISTRIB_ID
"
]
||
DISTRIB_ID
=
"Generic"
fi
...
...
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