Skip to content

Instantly share code, notes, and snippets.

@bbelyeu
Created April 30, 2013 21:42
Show Gist options
  • Save bbelyeu/5492178 to your computer and use it in GitHub Desktop.
Save bbelyeu/5492178 to your computer and use it in GitHub Desktop.
# Check if .zshrc exists
if [ -f "$HOME/.zshrc" ]; then
echo ".zshrc exists..."
# Check for any .zshrc changes
if diff $HOME/.zshrc $BIN_DIR/zshrc > /dev/null; then
echo ".zshrc file has not changed. Nothing to do. Booooring."
else
echo ".zshrc file has changed! Copying to backup..."
cp -f $HOME/.zshrc $BIN_DIR/zshrc
fi
else
echo ".zshrc does not exist"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment