mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-24 12:31:25 -05:00
17 lines
384 B
Bash
Executable file
17 lines
384 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# Exit if no argument has been provided
|
|
[[ -z "$1" ]] && exit 1
|
|
|
|
# Variables
|
|
url="$1"
|
|
name="${url/*\/}"
|
|
|
|
# Exit if no name exists or the url and name variables are the same
|
|
[[ -z "$name" || "$url" = "$name" ]] && exit 1
|
|
|
|
# Add the submodule
|
|
git submodule add "$url" "vim/bundle/$name" || exit 1
|
|
|
|
# Initialize the submodule
|
|
git submodule update --init --recursive
|