Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
distro_info
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
korinf
distro_info
Commits
2bcc6bf6
Commit
2bcc6bf6
authored
Sep 05, 2021
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix override VENDOR_ID
parent
9ebb3966
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
distro_info
bin/distro_info
+14
-13
No files found.
bin/distro_info
View file @
2bcc6bf6
...
@@ -44,7 +44,14 @@ tolower()
...
@@ -44,7 +44,14 @@ tolower()
echo
"
$*
"
|
awk
'{print tolower($0)}'
echo
"
$*
"
|
awk
'{print tolower($0)}'
}
}
# Translate DISTRIB_ID to vendor name (like %_vendor does)
override_distrib
()
{
[
-n
"
$1
"
]
||
return
VENDOR_ID
=
''
DISTRIB_ID
=
"
$1
"
}
# Translate DISTRIB_ID to vendor name (like %_vendor does), uses VENDOR_ID by default
rpmvendor
()
rpmvendor
()
{
{
[
"
$DISTRIB_ID
"
=
"ALTLinux"
]
&&
echo
"alt"
&&
return
[
"
$DISTRIB_ID
"
=
"ALTLinux"
]
&&
echo
"alt"
&&
return
...
@@ -719,14 +726,12 @@ case $1 in
...
@@ -719,14 +726,12 @@ case $1 in
exit
0
exit
0
;;
;;
-p
)
-p
)
# override DISTRIB_ID
override_distrib
"
$2
"
test
-n
"
$2
"
&&
DISTRIB_ID
=
"
$2
"
pkgtype
pkgtype
exit
0
exit
0
;;
;;
-g
)
-g
)
# override DISTRIB_ID
override_distrib
"
$2
"
test
-n
"
$2
"
&&
DISTRIB_ID
=
"
$2
"
pkgmanager
pkgmanager
exit
0
exit
0
;;
;;
...
@@ -734,14 +739,12 @@ case $1 in
...
@@ -734,14 +739,12 @@ case $1 in
print_pretty_name
print_pretty_name
;;
;;
--distro-arch
)
--distro-arch
)
# override DISTRIB_ID
override_distrib
"
$2
"
test
-n
"
$2
"
&&
DISTRIB_ID
=
"
$2
"
get_distro_arch
get_distro_arch
exit
0
exit
0
;;
;;
--debian-arch
)
--debian-arch
)
# override DISTRIB_ID
override_distrib
"
$2
"
test
-n
"
$2
"
&&
DISTRIB_ID
=
"
$2
"
get_debian_arch
get_debian_arch
exit
0
exit
0
;;
;;
...
@@ -773,14 +776,12 @@ case $1 in
...
@@ -773,14 +776,12 @@ case $1 in
echo
$DISTRIB_RELEASE
echo
$DISTRIB_RELEASE
;;
;;
-s
)
-s
)
# override DISTRIB_ID
override_distrib
"
$2
"
test
-n
"
$2
"
&&
DISTRIB_ID
=
"
$2
"
pkgvendor
pkgvendor
exit
0
exit
0
;;
;;
-n
)
-n
)
# override DISTRIB_ID
override_distrib
"
$2
"
test
-n
"
$2
"
&&
DISTRIB_ID
=
"
$2
"
rpmvendor
rpmvendor
exit
0
exit
0
;;
;;
...
...
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