mirror of
https://github.com/prurigro/darkcloud-vimconfig.git
synced 2024-12-21 08:10:23 -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
|