install: run PlugInstall immediately

This commit is contained in:
Charles Gould 2020-05-04 22:50:05 -05:00
parent c066771ff7
commit 9012d57334
3 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Check if Homebrew is already installed
if [ -x "$(command -v brew)" ]; then

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
DOTFILES="$HOME/dotfiles"

View File

@ -1,7 +1,10 @@
#!/bin/sh
#!/bin/bash
DOTFILES="$HOME/dotfiles"
# Install symlinks
"$DOTFILES/install-symlinks.sh"
# Install plugin manager for Neovim, if it doesn't exist
VIM_PLUG_SRC="https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
VIM_PLUG_DST="$HOME/.local/share/nvim/site/autoload/plug.vim"
@ -10,13 +13,10 @@ if [ ! -f "$VIM_PLUG_DST" ]; then
curl -fsSL -o "$VIM_PLUG_DST" --create-dirs "$VIM_PLUG_SRC"
fi
# Add Homebrew-managed shells to system list
BREW_PREFIX=`brew --prefix`
grep -q "$BREW_PREFIX/bin/bash" /etc/shells || echo "$BREW_PREFIX/bin/bash" | sudo tee -a /etc/shells
grep -q "$BREW_PREFIX/bin/fish" /etc/shells || echo "$BREW_PREFIX/bin/fish" | sudo tee -a /etc/shells
# Install plugins for Neovim
nvim +PlugInstall +qall
# Make fish the default shell
sudo chsh -s "$BREW_PREFIX/bin/fish" `whoami`
# Install symlinks
"$DOTFILES/install-symlinks.sh"
BREW_PREFIX=$(brew --prefix)
grep -q "$BREW_PREFIX/bin/fish" /etc/shells || echo "$BREW_PREFIX/bin/fish" | sudo tee -a /etc/shells
sudo chsh -s "$BREW_PREFIX/bin/fish" $(whoami)