Created
July 21, 2018 23:30
-
-
Save carlbennett/393479d4da8c82adb1f794db9c49f0eb to your computer and use it in GitHub Desktop.
Updates the system using either dnf or yum (whichever's available)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/usr/bin/yum --version | /usr/bin/grep dnf >/dev/null 2>&1 | |
[ $? -eq 0 ] && DNF=1 || DNF=0 | |
if [ $DNF -eq 0 ]; then | |
/usr/bin/yum update -y | |
else | |
/usr/bin/dnf update -y --refresh | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment