diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2018-01-18 02:10:38 -0500 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2018-01-18 02:10:38 -0500 |
commit | 9e7af4fefe25d4b16b894e42406886f97705e9a9 (patch) | |
tree | 9057dc36abe7eabc9b5fd801fa57e8e636b8d46f /PlugRemove.sh | |
parent | 1aed5e2d67d7a54afdd667899e964b86c5dc5013 (diff) |
Created scripts to automate vim plugins management
All scripts commit the changes.
Diffstat (limited to 'PlugRemove.sh')
-rwxr-xr-x | PlugRemove.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/PlugRemove.sh b/PlugRemove.sh new file mode 100755 index 0000000..e8e0343 --- /dev/null +++ b/PlugRemove.sh @@ -0,0 +1,35 @@ +#!/bin/bash +#!/bin/bash +if [ "$PWD" != "$HOME/dotfiles" ] +then + echo "Must be run in $HOME/dotfiles" + exit 1 +fi + + +PLUG_PATH="vim/.vim/pack/$USER/start/" +ARGS=0 +while getopts o opt; do + ((ARGS++)) + + if [ "$opt" == "o" ] + then + PLUG_PATH="vim/.vim/pack/$USER/opt/" + fi + if [ "$opt" == "h" ] + then + nroff .PlugHelp.tr + exit 0 + fi +done +((ARGS++)) +NAME="${!ARGS}" +FILENAME="$PLUG_PATH$NAME" + +git submodule deinit -f $FILENAME +echo +git rm -f $FILENAME +echo +rm -rfv ".git/modules/$FILENAME" + +git commit -m"Removed vim plugin: $NAME" |