aboutsummaryrefslogtreecommitdiffstats
path: root/linker.sh
diff options
context:
space:
mode:
authorMatt Kohls <mattkohls13@gmail.com>2020-04-07 00:03:31 -0400
committerMatt Kohls <mattkohls13@gmail.com>2020-04-07 00:06:16 -0400
commit126c79af4b43becba7bf46d40851c7f3f4e79d22 (patch)
tree9e3b350f29e0f0cc6e721c7101676b7e3a27c826 /linker.sh
parentc65afb13e9a2890f6b2d659a67f4bc054fad766f (diff)
downloaddotfiles-126c79af4b43becba7bf46d40851c7f3f4e79d22.tar.gz
dotfiles-126c79af4b43becba7bf46d40851c7f3f4e79d22.tar.bz2
dotfiles-126c79af4b43becba7bf46d40851c7f3f4e79d22.zip
cleaning up repo, updating dots
Diffstat (limited to 'linker.sh')
-rwxr-xr-xlinker.sh34
1 files changed, 20 insertions, 14 deletions
diff --git a/linker.sh b/linker.sh
index 7c4b382..3ec63c3 100755
--- a/linker.sh
+++ b/linker.sh
@@ -1,48 +1,54 @@
#!/bin/bash
-# Matt Kohls 2017
+# Matt Kohls 2020
# License GPLv3 or later
# Save dir of where we start from to link back to
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-cd ~
+cd ~ || echo "Unable to change directory" && exit
# Start with .bashrc
if [[ -e .bashrc ]] ; then
- cp .bashrc .bashrc.original
+ mv .bashrc .bashrc.original
fi
ln -s "$DIR"/.bashrc ~/.bashrc
# Next .vim(rc)
if [[ -e .vimrc ]] ; then
- cp .vimrc .vimrc.original
-fi
-if [[ -e .vim ]] ; then
- cp -r .vim .vim.original
+ mv .vimrc .vimrc.original
fi
ln -s "$DIR"/.vimrc ~/.vimrc
-ln -s "$DIR"/.vim ~/.vim
+
+echo "Install VundleVim if not already present"
# Next .git
if [[ -e .gitconfig ]] ; then
- cp .gitconfig .gitconfig.original
+ mv .gitconfig .gitconfig.original
fi
if [[ -e .gitignore_global ]] ; then
- cp .gitignore_global .gitignore_global.original
+ mv .gitignore_global .gitignore_global.original
fi
ln -s "$DIR"/.gitconfig ~/.gitconfig
ln -s "$DIR"/.gitignore_global ~/.gitignore_global
+# Conky
+if [[ -e .conkyrc ]] ; then
+ mv .conkyrc .conkyrc_original
+fi
+ln -s "$DIR"/.conkyrc ~/.conkyrc
+
# .config stuff
-cd ~
+cd ~ || echo "Unable to change directory" && exit
if [[ ! -e .config ]] ; then
mkdir .config
fi
# Neovim
-cd .config
+cd .config || echo "Unable to access config directory" && exit
if [[ -e nvim ]] ; then
- cp -r nvim nvim.original
+ mv nvim nvim.original
+else
+ mkdir nvim
fi
-ln -s "$DIR"/nvim ~/.config/nvim
+ln -s "$DIR"/init.vim ~/.config/nvim/init.vim