nvim: Improve plugin update script
This commit is contained in:
parent
8d63447dca
commit
ee45da74f4
1 changed files with 6 additions and 7 deletions
|
@ -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}\";
|
||||||
|
|
Loading…
Reference in a new issue