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
b3305e0c
Commit
b3305e0c
authored
Dec 15, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
distr_info: add --full-version
parent
f2b41372
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
distr_info
bin/distr_info
+15
-9
No files found.
bin/distr_info
View file @
b3305e0c
...
@@ -288,6 +288,8 @@ fill_distr_info()
...
@@ -288,6 +288,8 @@ fill_distr_info()
PRETTY_NAME
=
""
PRETTY_NAME
=
""
DISTRIB_ID
=
""
DISTRIB_ID
=
""
DISTRIB_RELEASE
=
""
DISTRIB_RELEASE
=
""
DISTRIB_FULL_RELEASE
=
""
DISTRIB_RELEASE_ORIG
=
""
DISTRIB_CODENAME
=
""
DISTRIB_CODENAME
=
""
# Default detection by /etc/os-release
# Default detection by /etc/os-release
...
@@ -302,13 +304,14 @@ if distro os-release ; then
...
@@ -302,13 +304,14 @@ if distro os-release ; then
# set by os-release:
# set by os-release:
#PRETTY_NAME
#PRETTY_NAME
VENDOR_ID
=
"
$ID
"
VENDOR_ID
=
"
$ID
"
DISTRIB_FULL_RELEASE
=
$DISTRIB_RELEASE
DISTRIB_FULL_RELEASE
=
"
$DISTRIB_RELEASE
"
DISTRIB_CODENAME
=
"
$VERSION_CODENAME
"
DISTRIB_CODENAME
=
"
$VERSION_CODENAME
"
elif
distro lsb-release
;
then
elif
distro lsb-release
;
then
DISTRIB_ID
=
$(
cat
$DISTROFILE
| get_var DISTRIB_ID
)
DISTRIB_ID
=
$(
cat
$DISTROFILE
| get_var DISTRIB_ID
)
DISTRIB_RELEASE
=
$(
cat
$DISTROFILE
| get_var DISTRIB_RELEASE
)
DISTRIB_RELEASE
=
"
$(
cat
$DISTROFILE
| get_var DISTRIB_RELEASE
)
"
DISTRIB_RELEASE_ORIG
=
"
$DISTRIB_RELEASE
"
DISTRIB_RELEASE_ORIG
=
"
$DISTRIB_RELEASE
"
DISTRIB_FULL_RELEASE
=
"
$DISTRIB_RELEASE
"
DISTRIB_CODENAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_CODENAME
)
DISTRIB_CODENAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_CODENAME
)
PRETTY_NAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_DESCRIPTION
)
PRETTY_NAME
=
$(
cat
$DISTROFILE
| get_var DISTRIB_DESCRIPTION
)
fi
fi
...
@@ -329,10 +332,8 @@ case "$VENDOR_ID" in
...
@@ -329,10 +332,8 @@ case "$VENDOR_ID" in
esac
esac
;;
;;
"astra"
)
"astra"
)
DISTRIB_RELEASE
=
$(
normalize_version3
"
$DISTRIB_RELEASE_ORIG
"
|
sed
-e
's|_.*||'
)
DISTRIB_RELEASE
=
$(
normalize_version2
"
$DISTRIB_RELEASE_ORIG
"
|
sed
-e
's|_.*||'
)
[
"
$VARIANT
"
=
"orel"
]
&&
DISTRIB_ID
=
"AstraLinuxCE"
||
DISTRIB_ID
=
"AstraLinuxSE"
DISTRIB_FULL_RELEASE
=
$(
normalize_version3
"
$DISTRIB_RELEASE_ORIG
"
|
sed
-e
's|_.*||'
)
#[ "$DISTRIB_RELEASE" = "1.17" ] && DISTRIB_RELEASE="$VERSION_ID"
#DISTRIB_RELEASE="$VERSION_CODENAME"
;;
;;
esac
esac
...
@@ -349,7 +350,7 @@ case "$DISTRIB_ID" in
...
@@ -349,7 +350,7 @@ case "$DISTRIB_ID" in
# ;;
# ;;
"ALTSPWorkstation"
)
"ALTSPWorkstation"
)
DISTRIB_ID
=
"ALTLinux"
DISTRIB_ID
=
"ALTLinux"
case
"
$DISTRIB_
FULL_RELEASE
"
in
case
"
$DISTRIB_
RELEASE_ORIG
"
in
8.0|8.1
)
8.0|8.1
)
;;
;;
8.2|8.3
)
8.2|8.3
)
...
@@ -815,7 +816,8 @@ case "$1" in
...
@@ -815,7 +816,8 @@ case "$1" in
echo
" -s|-n - print base name of the distro (vendor name) (ubuntu for all Ubuntu family, alt for all ALT family) (see _vendor macros in rpm)"
echo
" -s|-n - print base name of the distro (vendor name) (ubuntu for all Ubuntu family, alt for all ALT family) (see _vendor macros in rpm)"
echo
" -y - print running service manager"
echo
" -y - print running service manager"
echo
" --pretty - print pretty distro name"
echo
" --pretty - print pretty distro name"
echo
" -v - print version of distro"
echo
" -v - print version of the distro"
echo
" --full-version - print full version of the distro"
echo
" -V - print the utility version"
echo
" -V - print the utility version"
echo
"Run without args to print all information."
echo
"Run without args to print all information."
exit
0
exit
0
...
@@ -877,7 +879,11 @@ case "$1" in
...
@@ -877,7 +879,11 @@ case "$1" in
;;
;;
-v
)
-v
)
override_distrib
"
$2
"
override_distrib
"
$2
"
echo
$DISTRIB_RELEASE
echo
"
$DISTRIB_RELEASE
"
;;
--full-version
)
override_distrib
"
$2
"
echo
"
$DISTRIB_FULL_RELEASE
"
;;
;;
-s
|
-n
)
-s
|
-n
)
override_distrib
"
$2
"
override_distrib
"
$2
"
...
...
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