Test dnf before yum

yum may still be installed (by default in recent Fedoras) and will display a deprecation and migration message. On the other hand, dnf either is or isn't installed and the test will proceed as intended. (dnf is the modern replacement for yum.)
This commit is contained in:
Daniel Aleksandersen
2015-11-16 23:37:17 +01:00
parent fc07238804
commit 85d7b9406d
+5 -4
View File
@@ -4,12 +4,13 @@
# - Fedora 22 (x64)
# - Centos 7 (x64: on AWS EC2 t2.micro, DigitalOcean droplet)
if type yum 2>/dev/null
then
tool=yum
elif type dnf 2>/dev/null
if type dnf 2>/dev/null
then
tool=dnf
elif type yum 2>/dev/null
then
tool=yum
else
echo "Neither yum nor dnf found. Aborting bootstrap!"
exit 1