forked from mudhorn/dotfiles
Merge pull request #1 from digitalsparky/master
Add uninstaller, and make installer dynamic
This commit is contained in:
commit
cc25cf4b18
21
install.sh
21
install.sh
|
@ -1,15 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do
|
||||||
rm ~/.bashrc
|
if [ -e ~/$file ]; then
|
||||||
rm ~/.bash_aliases
|
mv -f ~/$file{,.dtbak}
|
||||||
rm ~/.bash_exports
|
fi
|
||||||
rm ~/.bash_wrappers
|
ln -s $PWD/$file ~/$file
|
||||||
rm ~/.vimrc
|
done
|
||||||
rm ~/.screenrc
|
echo "Installed"
|
||||||
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 ~/
|
|
||||||
|
|
10
uninstall.sh
Normal file
10
uninstall.sh
Normal 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"
|
Loading…
Reference in a new issue