Skip to content

Instantly share code, notes, and snippets.

@nathan-v
Created September 27, 2017 21:26
Show Gist options
  • Save nathan-v/60eca004d9755ba43d8f3d430194db89 to your computer and use it in GitHub Desktop.
Save nathan-v/60eca004d9755ba43d8f3d430194db89 to your computer and use it in GitHub Desktop.
Script to quickly update *env tools like RBEnv
#!/bin/bash
# Dev env update script for *env tools
# Supports: RBEnv, RBEnv Ruby Build plugin, PyEnv, GoEnv
if [ -d "$HOME/.rbenv/" ]; then
echo "Updating RbEnv..."
cd $HOME/.rbenv/
git pull
echo -e "...done.\n"
if [ -d "./plugins/ruby-build/" ]; then
echo "Updating RbEnv Plugin: Ruby Build..."
cd ./plugins/ruby-build/
git pull
echo -e "...done.\n"
fi
fi
if [ -d "$HOME/.pyenv/" ]; then
echo "Updating PyEnv..."
cd $HOME/.pyenv/
git pull
echo -e "...done.\n"
fi
if [ -d "$HOME/.goenv/" ]; then
echo "Updating GoEnv..."
cd $HOME/.goenv/
git pull
echo -e "...done.\n"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment