Add add/delete submodule scripts and remove them from gitignore

master
Kevin MacMartin 9 years ago
parent a3fd39afe6
commit 35a433f2a4

4
.gitignore vendored

@ -1,6 +1,2 @@
add-submodule
delete-submodule
add-pager-submodule
delete-pager-submodule
vim/bundle.user/*
vim/vimrc.user

@ -0,0 +1,7 @@
#!/usr/bin/env bash
[[ -z $1 ]] && exit 1
[[ -z $2 ]] && exit 1
git submodule add $1 vim/bundle/${2}
git submodule update --init --recursive

@ -0,0 +1,7 @@
#!/usr/bin/env bash
[[ -z $1 ]] && exit 1
[[ -d "vim/bundle/${1}" ]] && git submodule deinit -f $2 "vim/bundle/${1}" || echo "Couldn't run 'git submodule deinit $2 vim/bundle/${1}', $1 does not exist"
[[ -d "vim/bundle/${1}" ]] && git rm "vim/bundle/${1}" || echo "Couldn't run 'git rm vim/bundle/${1}', vim/bundle/${1} does not exist"
[[ -d "${PWD}/.git/modules/vim/bundle/${1}" ]] && rm -rf "${PWD}/.git/modules/vim/bundle/${1}" || echo "Couldn't run 'rm -rf ${PWD}/.git/modules/vim/bundle/${1}', ${PWD}/.git/modules/vim/bundle/${1} does not exist"
Loading…
Cancel
Save