added an uninstall script

moveTools
Adam Veldhousen 2015-06-24 10:51:13 -05:00
parent 877504a362
commit cd99620062
Signed by: adam
GPG Key ID: 6DB29003C6DD1E4B
1 changed files with 20 additions and 0 deletions

20
remove.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
src=$(pwd)
pushd .. 2&> /dev/null
echo "Uninstalling files..."
ls -lAp $src | grep "^-" | awk '{print $9}' | xargs -n 1 -I file rm -f file
echo ""
echo "Restoring from home bkup..."
ls -lA ./home_bkup | grep "^-" | awk '{print $9}' | xargs -n 1 -P 8 -I file cp home_bkup/file file
echo ""
echo "Cleaning up home backup and tools..."
rm -rf ./home_bkup
rm -rf ./tools
popd 2&> /dev/null
echo ""
echo ".ssh config has been left alone"
echo ""
echo "Restore completed"