Switch to single script/data file
This commit is contained in:
@@ -1 +0,0 @@
|
||||
https://tpope.io/vim/dadbod.git
|
||||
@@ -1 +0,0 @@
|
||||
https://github.com/airblade/vim-gitgutter
|
||||
@@ -1 +0,0 @@
|
||||
https://github.com/preservim/nerdtree.git
|
||||
@@ -1 +0,0 @@
|
||||
https://github.com/SirVer/ultisnips
|
||||
@@ -1,11 +1,46 @@
|
||||
#!/bin/bash
|
||||
for u in *.url ; do
|
||||
d=${u%.url}
|
||||
if [[ -d $d ]]; then
|
||||
echo "*** Updating: $d" >&2
|
||||
git -C $d pull --prune 2>&1 | sed "s/^/[$d] /g" >&2
|
||||
else
|
||||
echo "*** Cloning: $d" >&2
|
||||
git clone --depth 1 $(< $u) 2>&1 | sed "s/^/[$d] /g" >&2
|
||||
fi
|
||||
done
|
||||
|
||||
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
|
||||
'
|
||||
|
||||
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
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
https://github.com/vim-airline/vim-airline
|
||||
@@ -1 +0,0 @@
|
||||
https://github.com/altercation/vim-colors-solarized
|
||||
@@ -1 +0,0 @@
|
||||
https://github.com/sheerun/vim-polyglot
|
||||
@@ -1 +0,0 @@
|
||||
https://github.com/honza/vim-snippets
|
||||
@@ -1 +0,0 @@
|
||||
https://github.com/jreybert/vimagit
|
||||
Reference in New Issue
Block a user