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
Nurlan
eepm
Commits
5e9c477a
Commit
5e9c477a
authored
Sep 06, 2021
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
distr_name: update to 2.6
parent
50222c35
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
distr_info
bin/distr_info
+17
-14
No files found.
bin/distr_info
View file @
5e9c477a
...
...
@@ -44,7 +44,15 @@ tolower()
echo
"
$*
"
|
awk
'{print tolower($0)}'
}
# Translate DISTRIB_ID to vendor name (like %_vendor does)
override_distrib
()
{
[
-n
"
$1
"
]
||
return
VENDOR_ID
=
''
DISTRIB_ID
=
"
$(
echo
"
$1
"
|
sed
-e
's|/.*||'
)
"
DISTRIB_RELEASE
=
"
$(
echo
"
$1
"
|
sed
-e
's|.*/||'
)
"
}
# Translate DISTRIB_ID to vendor name (like %_vendor does), uses VENDOR_ID by default
rpmvendor
()
{
[
"
$DISTRIB_ID
"
=
"ALTLinux"
]
&&
echo
"alt"
&&
return
...
...
@@ -128,6 +136,7 @@ case $DISTRIB_ID in
Fedora|LinuxXP|ASPLinux|CentOS|RHEL|Scientific|GosLinux|Amzn|RedOS
)
CMD
=
"dnf-rpm"
which dnf 2>/dev/null
>
/dev/null
||
CMD
=
yum-rpm
[
"
$DISTRIB_ID
/
$DISTRIB_RELEASE
"
=
"CentOS/7"
]
&&
CMD
=
yum-rpm
;;
Slackware
)
CMD
=
"slackpkg"
...
...
@@ -168,7 +177,7 @@ case $DISTRIB_ID in
CMD
=
"xbps"
;;
*
)
fatal
"Have no suitable DISTRIB_ID
$DISTRIB_ID
"
echo
"We don't support yet DISTRIB_ID
$DISTRIB_ID
"
>
&2
;;
esac
echo
"
$CMD
"
...
...
@@ -719,14 +728,12 @@ case $1 in
exit
0
;;
-p
)
# override DISTRIB_ID
test
-n
"
$2
"
&&
DISTRIB_ID
=
"
$2
"
override_distrib
"
$2
"
pkgtype
exit
0
;;
-g
)
# override DISTRIB_ID
test
-n
"
$2
"
&&
DISTRIB_ID
=
"
$2
"
override_distrib
"
$2
"
pkgmanager
exit
0
;;
...
...
@@ -734,14 +741,12 @@ case $1 in
print_pretty_name
;;
--distro-arch
)
# override DISTRIB_ID
test
-n
"
$2
"
&&
DISTRIB_ID
=
"
$2
"
override_distrib
"
$2
"
get_distro_arch
exit
0
;;
--debian-arch
)
# override DISTRIB_ID
test
-n
"
$2
"
&&
DISTRIB_ID
=
"
$2
"
override_distrib
"
$2
"
get_debian_arch
exit
0
;;
...
...
@@ -773,14 +778,12 @@ case $1 in
echo
$DISTRIB_RELEASE
;;
-s
)
# override DISTRIB_ID
test
-n
"
$2
"
&&
DISTRIB_ID
=
"
$2
"
override_distrib
"
$2
"
pkgvendor
exit
0
;;
-n
)
# override DISTRIB_ID
test
-n
"
$2
"
&&
DISTRIB_ID
=
"
$2
"
override_distrib
"
$2
"
rpmvendor
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