Merge pull request #1 from digitalsparky/master

Add uninstaller, and make installer dynamic
This commit is contained in:
Lawrence Systems 2018-04-05 13:08:31 -04:00 committed by GitHub
commit cc25cf4b18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 14 deletions

View file

@ -1,15 +1,8 @@
#!/bin/bash
rm ~/.bashrc
rm ~/.bash_aliases
rm ~/.bash_exports
rm ~/.bash_wrappers
rm ~/.vimrc
rm ~/.screenrc
rm ~/.tmux.conf
ln -s dotfiles/.bashrc ~/
ln -s dotfiles/.bash_aliases ~/
ln -s dotfiles/.bash_exports ~/
ln -s dotfiles/.vimrc ~/
ln -s dotfiles/.screenrc ~/
ln -s dotfiles/.tmux.conf ~/
for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do
if [ -e ~/$file ]; then
mv -f ~/$file{,.dtbak}
fi
ln -s $PWD/$file ~/$file
done
echo "Installed"

10
uninstall.sh Normal file
View file

@ -0,0 +1,10 @@
#!/bin/bash
for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do
if [ -h ~/$file ]; then
rm -f ~/$file
fi
if [ -e ~/${file}.dtbak ]; then
mv -f ~/$file{.dtbak,}
fi
done
echo "Uninstalled"