| Name | Size | Mode |
| .. | ||
| .local/bin/nvim-install | 422 bytes | ?rwxr-xr-x |
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18
#!/bin/sh for url in "$@" do sub_dir="$(echo "$url" | grep -o '[^/]*/[^/]*$' | grep -o '^[^/]*')" pack="$(echo "$url" | grep -o '[^/]*$' | grep -o '^[^.]*')" install_dir="$HOME/.local/share/nvim/site/pack/$sub_dir/start/$pack" if [ -d "$install_dir" ] then # Update the repository cd "$install_dir" || exit 1 git pull else # Clone the repository git clone "$url" "$install_dir" fi done