48 lines
996 B
Bash
Executable File
48 lines
996 B
Bash
Executable File
#!/bin/bash
|
|
|
|
PLUGINS='
|
|
https://github.com/preservim/nerdtree
|
|
https://github.com/SirVer/ultisnips
|
|
https://github.com/jreybert/vimagit
|
|
https://github.com/vim-airline/vim-airline
|
|
https://github.com/altercation/vim-colors-solarized
|
|
https://github.com/tpope/vim-dadbod.git
|
|
https://github.com/airblade/vim-gitgutter
|
|
https://github.com/sheerun/vim-polyglot
|
|
https://github.com/honza/vim-snippets
|
|
https://tpope.io/vim/fugitive.git
|
|
'
|
|
|
|
z=$'\e[0m'
|
|
red=$'\e[31m'
|
|
green=$'\e[32m'
|
|
|
|
show() {
|
|
local c="${green}" l
|
|
[[ $2 -eq 0 ]] || c="${red}"
|
|
echo "*** $1"
|
|
while read -r l; do
|
|
echo "${c}|${z} $l"
|
|
done <<< "$3"
|
|
echo ""
|
|
}
|
|
|
|
gitit() {
|
|
local cmd url dir txt rc
|
|
while read -r url; do
|
|
dir=${url##*/}
|
|
[[ ${dir} != *.git ]] || dir=${dir%.git}
|
|
cmd="git -C ${dir} pull --prune 2>&1"
|
|
[[ -d ${dir} ]] || cmd="git clone --depth 1 ${url} ${dir} 2>&1"
|
|
out="$(eval "$cmd")"
|
|
show "$url" $? "$out"
|
|
done
|
|
}
|
|
|
|
echo "$PLUGINS" \
|
|
| grep -Ev '^#' \
|
|
| grep -Ev '^\s*$' \
|
|
| gitit
|
|
|
|
# Fin
|