1
0
Fork 0

nvim: Improve plugin update script

This commit is contained in:
Daniel Kempkens 2022-04-24 00:16:45 +02:00
parent 8d63447dca
commit ee45da74f4

View file

@ -37,18 +37,17 @@ for plugin in "${plugin_array[@]}"; do
name="$(echo "$repo" | tr [.] '-')" name="$(echo "$repo" | tr [.] '-')"
fetch_submodules="$(echo "$plugin" | jq -r '.fetchSubmodules // empty')" fetch_submodules="$(echo "$plugin" | jq -r '.fetchSubmodules // empty')"
nix_prefetch_flags="--quiet"
if [ "$fetch_submodules" == "true" ]; then if [ "$fetch_submodules" == "true" ]; then
nix_submodules="--fetch-submodules" nix_prefetch_flags+=" --fetch-submodules"
else
nix_submodules=""
fi fi
if [ -z "$branch" ]; then if [ -n "$branch" ]; then
src_json="$(nix-prefetch-git --quiet $nix_submodules "$clone_src")" nix_prefetch_flags+=" --rev $branch"
else
src_json="$(nix-prefetch-git --quiet $nix_submodules --rev "$branch" "$clone_src")"
fi fi
src_json="$(nix-prefetch-git $nix_prefetch_flags "$clone_src")"
src="{ src="{
owner = \"${owner}\"; owner = \"${owner}\";
repo = \"${repo}\"; repo = \"${repo}\";