Created
October 24, 2013 23:18
-
-
Save bodiam/7146830 to your computer and use it in GitHub Desktop.
Uninstall GVM
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
#!/bin/bash | |
if [ ! -d ~/.gvm ]; then | |
echo "No .gvm directory found in home directory. Are you sure GVM is installed?" | |
exit 1 | |
fi | |
rm -rf ~/.gvm | |
for file in '.bashrc' '.bash_profile' '.zshrc' | |
do | |
date=$(date +"%m-%d-%Y") | |
tmp_file=$file.gvm-tmp_$date | |
cp $file $file.gvm-backup_$date | |
sed -e '/#THIS MUST BE AT THE END.*/,/.*gvm-init.sh/ d' $file > $tmp_file | |
mv $tmp_file $file | |
done | |
echo "GVM successfully uninstalled." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment