Skip to content

Instantly share code, notes, and snippets.

@Jintin
Created March 21, 2016 02:01
Show Gist options
  • Save Jintin/7d43980c1729ad7e547d to your computer and use it in GitHub Desktop.
Save Jintin/7d43980c1729ad7e547d to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
if type "brew" > /dev/null; then
echo "brew"
brew update
brew upgrade
fi
if type "npm" > /dev/null; then
echo "npm update"
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2)
do
npm -g update "$package"
done
fi
if type "gem" > /dev/null; then
echo "gem update"
for package in $(gem outdated | cut -d " " -f1)
do
gem update "$package"
done
fi
if type "pip" > /dev/null; then
echo "pip update"
for package in $(pip list --outdated | cut -d " " -f1)
do
pip install --upgrade "$package"
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment