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
6f76ad64
Commit
6f76ad64
authored
Mar 30, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
distr_info: drop separated vendor name
parent
456f62ab
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
19 deletions
+5
-19
distr_info
bin/distr_info
+5
-19
No files found.
bin/distr_info
View file @
6f76ad64
...
@@ -52,8 +52,8 @@ override_distrib()
...
@@ -52,8 +52,8 @@ override_distrib()
DISTRIB_RELEASE
=
"
$(
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
# Translate DISTRIB_ID to vendor name (like %_vendor does
or package release name uses
), uses VENDOR_ID by default
rpm
vendor
()
pkg
vendor
()
{
{
[
"
$DISTRIB_ID
"
=
"ALTLinux"
]
&&
echo
"alt"
&&
return
[
"
$DISTRIB_ID
"
=
"ALTLinux"
]
&&
echo
"alt"
&&
return
[
"
$DISTRIB_ID
"
=
"ALTServer"
]
&&
echo
"alt"
&&
return
[
"
$DISTRIB_ID
"
=
"ALTServer"
]
&&
echo
"alt"
&&
return
...
@@ -68,13 +68,6 @@ rpmvendor()
...
@@ -68,13 +68,6 @@ rpmvendor()
tolower
"
$DISTRIB_ID
"
tolower
"
$DISTRIB_ID
"
}
}
# Translate DISTRIB_ID name to package manner (like in the package release name)
pkgvendor
()
{
[
"
$DISTRIB_ID
"
=
"Mandriva"
]
&&
echo
"mdv"
&&
return
rpmvendor
}
# TODO: in more appropriate way
# TODO: in more appropriate way
#which pkcon 2>/dev/null >/dev/null && info "You can run $ PMTYPE=packagekit epm to use packagekit backend"
#which pkcon 2>/dev/null >/dev/null && info "You can run $ PMTYPE=packagekit epm to use packagekit backend"
...
@@ -722,8 +715,7 @@ Pretty distro name (--pretty): $(print_pretty_name)
...
@@ -722,8 +715,7 @@ Pretty distro name (--pretty): $(print_pretty_name)
CPU norm register size (-b):
$(
get_bit_size
)
CPU norm register size (-b):
$(
get_bit_size
)
System memory size (MB) (-m):
$(
get_memory_size
)
System memory size (MB) (-m):
$(
get_memory_size
)
Base OS name (-o):
$(
get_base_os_name
)
Base OS name (-o):
$(
get_base_os_name
)
Build system distro name (-s):
$(
pkgvendor
)
Base distro name (-s|-n):
$(
pkgvendor
)
Build system vendor name (-n):
$(
rpmvendor
)
(run with -h to get help)
(run with -h to get help)
EOF
EOF
...
@@ -744,11 +736,10 @@ case $1 in
...
@@ -744,11 +736,10 @@ case $1 in
echo
" -i - print virtualization type"
echo
" -i - print virtualization type"
echo
" -h - this help"
echo
" -h - this help"
echo
" -m - print system memory size (in MB)"
echo
" -m - print system memory size (in MB)"
echo
" -n [SystemName] - print vendor name (as _vendor macros in rpm)"
echo
" -o - print base OS name"
echo
" -o - print base OS name"
echo
" -p [SystemName] - print type of the packaging system"
echo
" -p [SystemName] - print type of the packaging system"
echo
" -g [SystemName] - print name of the packaging system"
echo
" -g [SystemName] - print name of the packaging system"
echo
" -s
[SystemName] - print name of distro for build system (like in the package release name
)"
echo
" -s
|-n [SystemName] - print base name of the distro (ubuntu for all Ubuntu family, alt for all ALT family) (as _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 distro"
...
@@ -806,16 +797,11 @@ case $1 in
...
@@ -806,16 +797,11 @@ case $1 in
-v
)
-v
)
echo
$DISTRIB_RELEASE
echo
$DISTRIB_RELEASE
;;
;;
-s
)
-s
|
-n
)
override_distrib
"
$2
"
override_distrib
"
$2
"
pkgvendor
pkgvendor
exit
0
exit
0
;;
;;
-n
)
override_distrib
"
$2
"
rpmvendor
exit
0
;;
-y
)
-y
)
get_service_manager
get_service_manager
;;
;;
...
...
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