forked from wmayner/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uninstall.sh
executable file
·38 lines (34 loc) · 1.13 KB
/
uninstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
# Remove any dotfiles that are symlinks to '*.symlink' files in this
# directory
for SOURCE_FILE in $(find $(pwd) -name '*.symlink'); do
LINK_FILE="$HOME/.$(basename ${SOURCE_FILE%.symlink})"
if [ "$(readlink $LINK_FILE)" == "$SOURCE_FILE" ]; then
echo "Removing symlink $LINK_FILE -> $SOURCE_FILE"
rm $LINK_FILE
fi
done
# Remove IPython config
LINK_FILE="$HOME/.ipython/profile_default/ipython_config.py"
SOURCE_FILE="$(pwd)/ipython/ipython_config.py"
if [ "$(readlink $LINK_FILE)" == "$SOURCE_FILE" ]; then
echo "Removing symlink $LINK_FILE -> $SOURCE_FILE"
rm $LINK_FILE
fi
# Remove Neovim config
LINK_FILE="$HOME/.config/nvim/init.vim"
SOURCE_FILE=$(find . -name "vimrc.symlink")
if [ "$(readlink $LINK_FILE)" == "$SOURCE_FILE" ]; then
echo "Removing symlink $LINK_FILE -> $SOURCE_FILE"
rm $LINK_FILE
fi
LINK_FILE="$HOME/.vim"
SOURCE_FILE="$HOME/.config/nvim"
if [ "$(readlink $LINK_FILE)" == "$SOURCE_FILE" ]; then
echo "Removing symlink $LINK_FILE -> $SOURCE_FILE"
rm $LINK_FILE
fi
# Remove Neovim virtualenvs
source $(which virtualenvwrapper.sh)
rmvirtualenv neovim-python2
rmvirtualenv neovim-python3