Refactored to be arrays

This commit is contained in:
Josh Sherman 2018-04-21 11:26:25 -05:00
parent 981bc1013d
commit 03b30e9edf
No known key found for this signature in database
GPG key ID: 55B058A80530EF22
2 changed files with 40 additions and 8 deletions

32
install
View file

@ -44,16 +44,32 @@ mkdir -p \
$GITCLONE https://github.com/junegunn/fzf.git $DOTFZF
$DOTFZF/install --key-bindings --completion --no-update-rc
$GITCLONE https://github.com/zsh-users/zsh-completions.git $DOTLOCAL/zsh-completions
$GITCLONE https://github.com/zsh-users/zsh-history-substring-search.git $DOTLOCAL/zsh-history-substring-search
$GITCLONE https://github.com/zsh-users/zsh-syntax-highlighting.git $DOTLOCAL/zsh-syntax-highlighting
ZSHPLUGS=(
"zsh-completions"
"zsh-history-substring-search"
"zsh-syntax-highlighting"
)
$GITCLONE https://github.com/w0rp/ale.git $HOME/.vim/pack/plugins/start/ale
$GITCLONE https://github.com/junegunn/fzf.vim.git $HOME/.vim/pack/plugins/start/fzf
for INDEX in ${!ZSHPLUGS[*]}; do
ZSHPLUG="${ZSHPLUGS[$INDEX]}"
$GITCLONE https://github.com/zsh-users/${ZSHPLUG}.git $DOTLOCAL/$ZSHPLUG
done
$GITCLONE https://github.com/jelera/vim-javascript-syntax.git $HOME/.vim/pack/plugins/start/vim-javascript-syntax
$GITCLONE https://github.com/pangloss/vim-javascript.git $HOME/.vim/pack/plugins/start/vim-javascript
$GITCLONE https://github.com/Quramy/vim-js-pretty-template.git $HOME/.vim/pack/plugins/start/vim-js-pretty-template
VIMPLUGS=(
"w0rp/ale"
"junegunn/fzf.vim"
# JavaScript goodies
"jelera/vim-javascript-syntax"
"pangloss/vim-javascript"
"Quramy/vim-js-pretty-template"
)
for INDEX in ${!VIMPLUGS[*]}; do
VIMPLUG="${VIMPLUGS[$INDEX]}"
PLUGDIR=$(echo "$VIMPLUG" | cut -d '/' -f2)
$GITCLONE https://github.com/$VIMPLUG.git $HOME/.vim/pack/plugins/start/$PLUGDIR
done
cd $HOME
rm -f $HOME/.zcompdump*

16
test Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
VIMPLUGS=(
"w0rp/ale"
"junegunn/fzf.vim"
"jelera/vim-javascript-syntax"
"pangloss/vim-javascript"
"Quramy/vim-js-pretty-template"
)
for INDEX in ${!VIMPLUGS[*]}; do
VIMPLUG="${VIMPLUGS[$INDEX]}"
PLUGDIR=$(echo "$VIMPLUG" | cut -d '/' -f2)
$GITCLONE https://github.com/$VIMPLUG.git $HOME/.vim/pack/plugins/start/$PLUGDIR
done