Created
April 6, 2018 02:52
-
-
Save letientai299/f2744e1b7ac71c5d59033bcf65d0a150 to your computer and use it in GitHub Desktop.
Update software
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
# Update software {{{2 # | |
update-software() { | |
# Ubuntu {{{1 # | |
if command -v apt-get > /dev/null 2>&1; then | |
echo "--------------------------------------------------------------------------------" | |
echo "- Update software for Ubuntu" | |
echo "----------------------------------------" | |
sudo apt update | |
sudo apt full-upgrade -y | |
sudo apt autoremove -y | |
fi | |
# 1}}} # | |
# Centos {{{1 # | |
if command -v yum > /dev/null 2>&1; then | |
echo "--------------------------------------------------------------------------------" | |
echo "- Update software for Centos" | |
echo "----------------------------------------" | |
sudo yum update -y | |
fi | |
# 1}}} # | |
# Mac {{{1 # | |
if command -v brew > /dev/null 2>&1; then | |
echo "--------------------------------------------------------------------------------" | |
echo "- Update software for macOS" | |
echo "----------------------------------------" | |
brew update | |
brew upgrade | |
brew cask upgrade | |
fi | |
# }}} # | |
# Zplug {{{ # | |
echo "--------------------------------------------------------------------------------" | |
echo "- Update zplug" | |
echo "----------------------------------------" | |
zplug update | |
# }}} Zplug # | |
# Vim {{{1 # | |
echo "--------------------------------------------------------------------------------" | |
echo "- Vim plugins" | |
echo "----------------------------------------" | |
# Execute vim-plug upgrade, then update all plugins | |
vim -c "PlugUpgrade" -c "qa!" | |
vim -c "PlugUpdate" -c "qa!" | |
vim -c "UpdateRemotePlugins" -c "qa!" | |
# 1}}} # | |
} | |
# 2}}} # |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment