diff options
Diffstat (limited to 'vim_plugins.sh')
-rwxr-xr-x | vim_plugins.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/vim_plugins.sh b/vim_plugins.sh new file mode 100755 index 0000000..bb7ae77 --- /dev/null +++ b/vim_plugins.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +set -o errexit -o nounset -o pipefail +shopt -s inherit_errexit lastpipe + +plugins_dir="$HOME/.vim/pack/plugins/start" +readonly plugins_dir + +plugins=( + alteraction/vim-colors-solarized +) + +pull() { + local plugin + for plugin in ${plugins[@]+"${plugins[@]}"}; do + echo "Plugin: $plugin" + + local name + name="${plugin#*/}" + + if [ -d "$name" ]; then + git -C "$name" pull + else + git clone "https://github.com/$plugin.git" + fi + done +} + +main() { + mkdir -p -- "$plugins_dir" + cd -- "$plugins_dir" + pull +} + +main |