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
1e00616d
Commit
1e00616d
authored
Mar 24, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
distro_info: add --glibc-version
parent
c71b13d8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
distr_info
bin/distr_info
+13
-0
No files found.
bin/distr_info
View file @
1e00616d
...
@@ -529,6 +529,13 @@ get_uname()
...
@@ -529,6 +529,13 @@ get_uname()
tolower
$(
uname
$1
)
|
tr
-d
"
\t\r\n
"
tolower
$(
uname
$1
)
|
tr
-d
"
\t\r\n
"
}
}
get_glibc_version
()
{
for
i
in
/lib/x86_64-linux-gnu /lib64 /lib/i386-linux-gnu /lib
;
do
[
-x
"
$ROOTDIR$i
/libc.so.6"
]
&&
$ROOTDIR$i
/libc.so.6 |
head
-n1
|
grep
"version"
|
sed
-e
's|.*version ||'
-e
's|\.$||'
&&
return
done
}
get_base_os_name
()
get_base_os_name
()
{
{
local
DIST_OS
local
DIST_OS
...
@@ -835,6 +842,7 @@ case "$1" in
...
@@ -835,6 +842,7 @@ case "$1" in
echo
" --pretty - print pretty distro name"
echo
" --pretty - print pretty distro name"
echo
" -v - print version of the distro"
echo
" -v - print version of the distro"
echo
" --full-version - print full version of the distro"
echo
" --full-version - print full version of the distro"
echo
" --glibc-version - print system glibc version"
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
...
@@ -863,6 +871,11 @@ case "$1" in
...
@@ -863,6 +871,11 @@ case "$1" in
get_debian_arch
get_debian_arch
exit
0
exit
0
;;
;;
--glibc-version
)
override_distrib
"
$2
"
get_glibc_version
exit
0
;;
-d
)
-d
)
override_distrib
"
$2
"
override_distrib
"
$2
"
echo
$DISTRIB_ID
echo
$DISTRIB_ID
...
...
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