-
-
Save danielfilho/3522b28f4d57fdccd516 to your computer and use it in GitHub Desktop.
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
if [ -z $1 ] | |
then | |
if [ "$OS" == "Darwin" ] | |
then | |
echo "Updating…" | |
brew update | |
echo "Upgrading…" | |
brew upgrade | |
else | |
sudo apt-get update | |
sudo apt-get -u upgrade | |
fi | |
else | |
ssh $1 -t sudo apt-get update | |
local dummy | |
ssh $1 -t sudo apt-get --no-act upgrade | |
echo -n "Process the upgrade ?" | |
read -q dummy | |
if [[ $dummy = "y" ]] | |
then | |
ssh $1 -t sudo apt-get -u upgrade --yes | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment