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
718fdbf8
Commit
718fdbf8
authored
Mar 28, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
distr_info: add DISTRO_NAME
parent
bc560064
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
distr_info
bin/distr_info
+8
-0
No files found.
bin/distr_info
View file @
718fdbf8
...
...
@@ -52,6 +52,7 @@ override_distrib()
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|/.*||'
)
"
DISTRO_NAME
=
"
$DISTRIB_ID
"
DISTRIB_RELEASE
=
"
$(
echo
"
$name
"
|
sed
-e
's|.*/||'
)
"
[
"
$DISTRIB_ID
"
=
"
$DISTRIB_RELEASE
"
]
&&
DISTRIB_RELEASE
=
''
...
...
@@ -309,6 +310,7 @@ DISTRIB_CODENAME=""
if
distro os-release
;
then
# shellcheck disable=SC1090
.
$DISTROFILE
DISTRO_NAME
=
"
$NAME
"
DISTRIB_ID
=
"
$(
normalize_name
"
$NAME
"
)
"
DISTRIB_RELEASE_ORIG
=
"
$VERSION_ID
"
DISTRIB_RELEASE
=
"
$VERSION_ID
"
...
...
@@ -321,6 +323,7 @@ if distro os-release ; then
elif
distro lsb-release
;
then
DISTRIB_ID
=
$(
cat
$DISTROFILE
| get_var DISTRIB_ID
)
DISTRO_NAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_ID
)
DISTRIB_RELEASE
=
"
$(
cat
$DISTROFILE
| get_var DISTRIB_RELEASE
)
"
DISTRIB_RELEASE_ORIG
=
"
$DISTRIB_RELEASE
"
DISTRIB_FULL_RELEASE
=
"
$DISTRIB_RELEASE
"
...
...
@@ -846,6 +849,7 @@ case "$1" in
echo
" -s|-n|--vendor-name - print base name of the distro (vendor name) (ubuntu for all Ubuntu family, alt for all ALT family) (see _vendor macros in rpm)"
echo
" --pretty|--pretty-name - print pretty distro name"
echo
" -v | --base-version - print version of the distro"
echo
" --distro-name - print distro name"
echo
" --full-version - print full version of the distro"
echo
" --codename (obsoleted) - print distro codename (focal for Ubuntu 20.04)"
echo
" --repo-name - print repository name (focal for Ubuntu 20.04)"
...
...
@@ -886,6 +890,10 @@ case "$1" in
override_distrib
"
$2
"
echo
$DISTRIB_ID
;;
--distro-name
)
override_distrib
"
$2
"
echo
$DISTRO_NAME
;;
--codename
)
override_distrib
"
$2
"
print_codename
...
...
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