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
|
#!/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
|
||||||
|
|||||||
@@ -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