Skip to content

Instantly share code, notes, and snippets.

@janniks
Last active May 2, 2019 15:18
Show Gist options
  • Save janniks/fbc7f4a521d193d31f3bc54c1dab5c26 to your computer and use it in GitHub Desktop.
Save janniks/fbc7f4a521d193d31f3bc54c1dab5c26 to your computer and use it in GitHub Desktop.
Update zsh & Oh Mh Zsh & custom plugins/themes
#!/usr/bin/env zsh
COLOR_RESET='\033[0m'
COLOR_BLUE='\033[0;34m'
echo "\n${COLOR_BLUE}Updating zsh${COLOR_RESET}"
brew upgrade zsh
echo ""
/usr/bin/env zsh -i -c upgrade_oh_my_zsh
echo "\n${COLOR_BLUE}Updating custom Oh My Zsh plugins${COLOR_RESET}"
find ~/.oh-my-zsh/custom/plugins -type d -exec test -e '{}/.git' ';' -print0 | while read -rd $'\0' plugin
do
echo "\n${COLOR_BLUE}Updating:${COLOR_RESET} ${plugin}"
git -C $plugin pull
done
echo "\n${COLOR_BLUE}Updating custom Oh My Zsh themes${COLOR_RESET}"
find ~/.oh-my-zsh/custom/themes -type d -exec test -e '{}/.git' ';' -print0 | while read -rd $'\0' theme
do
echo "\n${COLOR_BLUE}Updating:${COLOR_RESET} ${theme}"
git -C $theme pull
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment