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
7753a62a
Commit
7753a62a
authored
Apr 29, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
distr_info: print output line for every option
parent
f2b24502
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
39 deletions
+25
-39
distr_info
bin/distr_info
+25
-39
No files found.
bin/distr_info
View file @
7753a62a
...
@@ -714,7 +714,7 @@ local DIST_BIT
...
@@ -714,7 +714,7 @@ local DIST_BIT
DIST_BIT
=
"
$(
getconf LONG_BIT 2>/dev/null
)
"
DIST_BIT
=
"
$(
getconf LONG_BIT 2>/dev/null
)
"
if
[
-n
"
$DIST_BIT
"
]
;
then
if
[
-n
"
$DIST_BIT
"
]
;
then
echo
"
$DIST_BIT
"
echo
"
$DIST_BIT
"
exit
return
fi
fi
# Try detect arch size by arch name
# Try detect arch size by arch name
...
@@ -929,64 +929,63 @@ print_help()
...
@@ -929,64 +929,63 @@ print_help()
fill_distr_info
fill_distr_info
[
-n
"
$DISTRIB_ID
"
]
||
DISTRIB_ID
=
"Generic"
[
-n
"
$DISTRIB_ID
"
]
||
DISTRIB_ID
=
"Generic"
if
[
-n
"
$*
"
]
;
then
eval
lastarg
=
\$
{
$#}
case
"
$lastarg
"
in
-
*
)
;;
*
)
override_distrib
"
$lastarg
"
# drop last arg
set
--
"
${
@
:1:
$((
$#-
1
))}
"
;;
esac
fi
case
"
$2
"
in
if
[
-z
"
$1
"
]
;
then
-
*
)
print_total_info
echo
"Unsupported option
$2
"
>
&2
exit
exit
1
fi
;;
esac
while
[
-n
"
$1
"
]
;
do
case
"
$1
"
in
case
"
$1
"
in
-h
|
--help
)
-h
|
--help
)
print_help
print_help
exit
0
exit
0
;;
;;
-p
|
--package-type
)
-p
|
--package-type
)
override_distrib
"
$2
"
pkgtype
pkgtype
exit
0
;;
;;
-g
)
-g
)
override_distrib
"
$2
"
pkgmanager
pkgmanager
exit
0
;;
;;
--pretty
|
--pretty-name
)
--pretty
|
--pretty-name
)
override_distrib
"
$2
"
print_pretty_name
print_pretty_name
;;
;;
--distro-arch
)
--distro-arch
)
override_distrib
"
$2
"
get_distro_arch
get_distro_arch
exit
0
;;
;;
--debian-arch
)
--debian-arch
)
override_distrib
"
$2
"
get_debian_arch
get_debian_arch
exit
0
;;
;;
--glibc-version
)
--glibc-version
)
override_distrib
"
$2
"
get_glibc_version
get_glibc_version
exit
0
;;
;;
-d
|
--base-distro-name
)
-d
|
--base-distro-name
)
override_distrib
"
$2
"
echo
$DISTRIB_ID
echo
$DISTRIB_ID
;;
;;
--distro-name
)
--distro-name
)
override_distrib
"
$2
"
echo
$DISTRO_NAME
echo
$DISTRO_NAME
;;
;;
--codename
)
--codename
)
override_distrib
"
$2
"
print_codename
print_codename
;;
;;
-a
)
-a
)
override_distrib
"
$2
"
if
[
-n
"
$DIST_ARCH
"
]
;
then
[
-n
"
$DIST_ARCH
"
]
&&
echo
"
$DIST_ARCH
"
&&
exit
0
echo
"
$DIST_ARCH
"
get_arch
else
get_arch
fi
;;
;;
-b
)
-b
)
get_bit_size
get_bit_size
...
@@ -1004,52 +1003,39 @@ case "$1" in
...
@@ -1004,52 +1003,39 @@ case "$1" in
get_memory_size
get_memory_size
;;
;;
-o
|
--os-name
)
-o
|
--os-name
)
override_distrib
"
$2
"
get_base_os_name
get_base_os_name
;;
;;
-r
|
--repo-name
)
-r
|
--repo-name
)
override_distrib
"
$2
"
print_repo_name
print_repo_name
;;
;;
--build-id
)
--build-id
)
echo
"
$BUILD_ID
"
echo
"
$BUILD_ID
"
;;
;;
-v
|
--base-version
)
-v
|
--base-version
)
override_distrib
"
$2
"
echo
"
$DISTRIB_RELEASE
"
echo
"
$DISTRIB_RELEASE
"
;;
;;
--full-version
|
--distro-version
)
--full-version
|
--distro-version
)
override_distrib
"
$2
"
echo
"
$DISTRIB_FULL_RELEASE
"
echo
"
$DISTRIB_FULL_RELEASE
"
;;
;;
--bug-report-url
)
--bug-report-url
)
print_bug_report_url
print_bug_report_url
exit
;;
;;
-s
|
-n
|
--vendor-name
)
-s
|
-n
|
--vendor-name
)
override_distrib
"
$2
"
pkgvendor
pkgvendor
exit
0
;;
;;
-y
|
--service-manager
)
-y
|
--service-manager
)
override_distrib
"
$2
"
get_service_manager
get_service_manager
;;
;;
-V
)
-V
)
echo
"
$PROGVERSION
"
echo
"
$PROGVERSION
"
exit
0
;;
;;
-e
)
-e
)
override_distrib
"
$2
"
print_name_version
print_name_version
;;
;;
-
*
)
-
*
)
echo
"Unsupported option
$1
"
>
&2
echo
"Unsupported option
$1
"
>
&2
exit
1
exit
1
;;
;;
*
)
override_distrib
"
$1
"
print_total_info
;;
esac
esac
shift
done
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