Last active
January 2, 2016 13:49
-
-
Save d5/8313028 to your computer and use it in GitHub Desktop.
curl "https://gist.sh/8313028" | sudo sh
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 | |
# RHEL 64bit/32bit | |
# SUSE 64bit/32bit | |
# Amazon Linux 64bit/32bit | |
# Ubuntu 64bit/32bit | |
info() { echo "INFO: $1"; } | |
die() { echo "ERROR: $1. Aborting!"; exit 1; } | |
info "update all packages" | |
if type yum > /dev/null 2>&1; then | |
if ! yum repolist all 2> /dev/null | grep epel > /dev/null 2>&1; then | |
info "install EPEL repo" | |
ARCH=`uname -i` | |
curl -O http://download-i2.fedoraproject.org/pub/epel/6/$ARCH/epel-release-6-8.noarch.rpm | |
rpm -ivh epel-release-6-8.noarch.rpm | |
fi | |
yum update -y | |
fi | |
if type zypper > /dev/null 2>&1; then | |
zypper --non-interactive update | |
fi | |
if type apt-get > /dev/null 2>&1; then | |
apt-get update -y | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment