Switch to single script/data file

This commit is contained in:
2024-01-16 14:47:15 -08:00
parent 99b9b121c5
commit ae924e325c
10 changed files with 45 additions and 19 deletions

View File

@@ -1 +0,0 @@
https://tpope.io/vim/dadbod.git

View File

@@ -1 +0,0 @@
https://github.com/airblade/vim-gitgutter

View File

@@ -1 +0,0 @@
https://github.com/preservim/nerdtree.git

View File

@@ -1 +0,0 @@
https://github.com/SirVer/ultisnips

View File

@@ -1,11 +1,46 @@
#!/bin/bash #!/bin/bash
for u in *.url ; do
d=${u%.url} PLUGINS='
if [[ -d $d ]]; then https://github.com/preservim/nerdtree
echo "*** Updating: $d" >&2 https://github.com/SirVer/ultisnips
git -C $d pull --prune 2>&1 | sed "s/^/[$d] /g" >&2 https://github.com/jreybert/vimagit
else https://github.com/vim-airline/vim-airline
echo "*** Cloning: $d" >&2 https://github.com/altercation/vim-colors-solarized
git clone --depth 1 $(< $u) 2>&1 | sed "s/^/[$d] /g" >&2 https://github.com/tpope/vim-dadbod.git
fi https://github.com/airblade/vim-gitgutter
done 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

View File

@@ -1 +0,0 @@
https://github.com/vim-airline/vim-airline

View File

@@ -1 +0,0 @@
https://github.com/altercation/vim-colors-solarized

View File

@@ -1 +0,0 @@
https://github.com/sheerun/vim-polyglot

View File

@@ -1 +0,0 @@
https://github.com/honza/vim-snippets

View File

@@ -1 +0,0 @@
https://github.com/jreybert/vimagit