diff --git a/README.md b/README.md index a5db920..f1b9c06 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Dotfiles -Welcome to my world. +Welcome to my world. This is a collection of vim, tmux, and zsh configurations. ## Contents @@ -21,3 +21,7 @@ Welcome to my world. ## ZSH Plugins By default, the `.zshrc` file will source any file within `.dotfiles/zsh` that have the `.zsh` extension. + +## Vim Plugins + +Vim plugins are managed with [vim-plug](https://github.com/junegunn/vim-plug). To install, run `vim +PlugInstall`. diff --git a/install.sh b/install.sh index 3ed9672..968f3cf 100755 --- a/install.sh +++ b/install.sh @@ -10,27 +10,26 @@ source install/link.sh if [ "$(uname)" == "Darwin" ]; then echo "Running on OSX" - echo "Installing homebrew" - ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - echo "Brewing all the things" - source scripts/brew.sh + source install/brew.sh echo "Updating OSX settings" - source scripts/osx.sh + source installosx.sh echo "Installing node (from nvm)" - nvm install stable - nvm alias default stable + source install/nvm.sh echo "Configuring nginx" # create a backup of the original nginx.conf mv /usr/local/etc/nginx/nginx.conf /usr/local/etc/nginx/nginx.original - ln -s nginx/nginx.conf /usr/local/etc/nginx/nginx.conf + ln -s ~/.dotfiles/nginx/nginx.conf /usr/local/etc/nginx/nginx.conf # symlink the code.dev from dotfiles - ln -s nginx/code.dev /usr/local/etc/nginx/sites-enabled/code.dev + ln -s ~/.dotfiles/nginx/code.dev /usr/local/etc/nginx/sites-enabled/code.dev fi +echo "creating vim directories" +mkdir -p ~/.vim-tmp + echo "Configuring zsh as default shell" chsh -s $(which zsh) diff --git a/install/brew.sh b/install/brew.sh index 47cfbc1..56fdef0 100755 --- a/install/brew.sh +++ b/install/brew.sh @@ -1,5 +1,12 @@ #!/bin/sh +if test ! $(which brew); then + echo "Installing homebrew" + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +fi + +echo "Installing homebrew packages..." + # cli tools brew install ack brew install tree @@ -20,3 +27,5 @@ brew install highlight brew install nvm brew install z brew install markdown + +exit 0 diff --git a/install/link.sh b/install/link.sh index 158db7b..31a78ee 100755 --- a/install/link.sh +++ b/install/link.sh @@ -3,7 +3,7 @@ DOTFILES=$HOME/.dotfiles echo "creating symlinks" -linkables=$( ls -1 -d **/*.symlink ) +linkables=$( find -H "$DOTFILES" -maxdepth 3 -name '*.symlink' ) for file in $linkables ; do target="$HOME/.$( basename $file ".symlink" )" echo "creating symlink for $file" diff --git a/install/nvm.sh b/install/nvm.sh new file mode 100755 index 0000000..81d212e --- /dev/null +++ b/install/nvm.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# reload nvm into this environment +source $(brew --prefix nvm)/nvm.sh + +nvm install stable +nvm alias default stable