diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..65bb00d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,12 @@ +[submodule ".vim/bundle/nerdtree"] + path = .vim/bundle/nerdtree + url = https://github.com/scrooloose/nerdtree.git +[submodule ".vim/bundle/rust.vim"] + path = .vim/bundle/rust.vim + url = https://github.com/rust-lang/rust.vim.git +[submodule ".vim/bundle/vim-markdown"] + path = .vim/bundle/vim-markdown + url = https://github.com/plasticboy/vim-markdown.git +[submodule ".vim/bundle/vimoutliner"] + path = .vim/bundle/vimoutliner + url = https://github.com/vimoutliner/vimoutliner.git diff --git a/.vim/bundle/nerdtree b/.vim/bundle/nerdtree new file mode 160000 index 0000000..bcf3de4 --- /dev/null +++ b/.vim/bundle/nerdtree @@ -0,0 +1 @@ +Subproject commit bcf3de4fdffae45fc7c85b6b84a01b37177924aa diff --git a/.vim/bundle/rust.vim b/.vim/bundle/rust.vim new file mode 160000 index 0000000..fa1bccc --- /dev/null +++ b/.vim/bundle/rust.vim @@ -0,0 +1 @@ +Subproject commit fa1bccc2bfc223326fb28869ed0461f39c7fa04a diff --git a/.vim/bundle/vim-markdown b/.vim/bundle/vim-markdown new file mode 160000 index 0000000..5ff1240 --- /dev/null +++ b/.vim/bundle/vim-markdown @@ -0,0 +1 @@ +Subproject commit 5ff124014066ba7882617c283e7750d449caafb4 diff --git a/.vim/bundle/vimoutliner b/.vim/bundle/vimoutliner new file mode 160000 index 0000000..7c995f9 --- /dev/null +++ b/.vim/bundle/vimoutliner @@ -0,0 +1 @@ +Subproject commit 7c995f973c54b0d026137615af28059890edb197 diff --git a/bootstrap.sh b/bootstrap.sh index a3bf1d5..b9322e0 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -19,12 +19,31 @@ link() { ln -sf "$PWD/$3" "$1/$2" } +link_dir() { + # Only make a backup if an existing directory is there and is not a link + if [ -d "$1/$2" ] && [ ! -L "$1/$2" ]; then + mv "$1/$2" "$1/$2.old" + echo "Backed up original $2 to $1/$2.old" + fi + ln -sf "$3" "$1/$2" +} + set -x set -e # Configure .vimrc link "$HOME" ".vimrc" "vimrc" +# Configure Pathogen Plugins +VIM_BUNDLE=$HOME/.vim/bundle +mkdir -p $VIM_BUNDLE +plugins=($(ls -d $PWD/.vim/bundle/* | tr -s ' ')) +for plugin in ${plugins[@]}; do + parts=($(echo "$plugin" | tr '/' ' ')) + plugin_name=${parts[-1]} + link_dir $VIM_BUNDLE $plugin_name $plugin +done + # Configure .gitconfig link "$HOME" ".gitconfig" "gitconfig" @@ -38,5 +57,6 @@ if [ ! -f "$HOME/.update_dotfiles.sh" ]; then echo "cd $PWD" >> $HOME/.update_dotfiles.sh echo "git checkout master" >> $HOME/.update_dotfiles.sh echo "git pull" >> $HOME/.update_dotfiles.sh + echo "git submodule update" >> $HOME/.update_dotfiles.sh chmod +x $HOME/.update_dotfiles.sh fi diff --git a/install_tools_arch.sh b/install_tools_arch.sh new file mode 100644 index 0000000..d19de20 --- /dev/null +++ b/install_tools_arch.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env sh + +set -x +set -e + +env=/usr/bin/env +opwd-$PWD + +cd $HOME + +# Install the minimal toolset to bootstrap out process +sudo pacman -Syu +sudo pacman -S curl wget git zsh vim tmux + +# Install OhMyZSH +mkdir -p $HOME/build/oh-my-zsh +cd $HOME/build/oh-my-zsh +curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -o install.sh +chmod +x install.sh +$env sh install.sh + +# Install pathogen for vim +cd $HOME +mkdir -p $HOME/.vim/autoload $HOME/.vim/bundle +curl -LSso $HOME/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim + +# Install Other Essential Tools + + +# Return to where we started +cd #opwd