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
cfbe7dde
Commit
cfbe7dde
authored
Jan 21, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
distr_info: improve checking for default package manager
parent
d18c8184
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
distr_info
bin/distr_info
+10
-4
No files found.
bin/distr_info
View file @
cfbe7dde
...
...
@@ -100,7 +100,7 @@ case $DISTRIB_ID in
PCLinux
)
CMD
=
"apt-rpm"
;;
Ubuntu|Debian|Mint|AstraLinux
*
|
Elbrus
)
Ubuntu|Debian|Mint|
OSNovaLinux|
AstraLinux
*
|
Elbrus
)
CMD
=
"apt-dpkg"
#which aptitude 2>/dev/null >/dev/null && CMD=aptitude-dpkg
#hascommand snappy && CMD=snappy
...
...
@@ -168,17 +168,23 @@ case $DISTRIB_ID in
;;
*
)
# try detect firstly
if
hascommand
"rpm"
;
then
if
grep
-q
"ID_LIKE=debian"
/etc/os-release 2>/dev/null
;
then
echo
"apt-dpkg"
&&
return
fi
if
hascommand
"rpm"
&&
[
-s
/var/lib/rpm/Name
]
;
then
hascommand
"zypper"
&&
echo
"zypper-rpm"
&&
return
hascommand
"apt-get"
&&
echo
"apt-rpm"
&&
return
hascommand
"dnf"
&&
echo
"dnf-rpm"
&&
return
hascommand
"apt-get"
&&
echo
"apt-rpm"
&&
return
hascommand
"yum"
&&
echo
"yum-rpm"
&&
return
hascommand
"urpmi"
&&
echo
"urpmi-rpm"
&&
return
fi
if
hascommand
"dpkg"
;
then
if
hascommand
"dpkg"
&&
[
-s
/var/lib/dpkg/status
]
;
then
hascommand
"apt"
&&
echo
"apt-dpkg"
&&
return
hascommand
"apt-get"
&&
echo
"apt-dpkg"
&&
return
fi
echo
"We don't support yet DISTRIB_ID
$DISTRIB_ID
"
>
&2
;;
esac
...
...
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