#!/bin/bash bundle="$1" if [ -z $bundle ]; then echo "please input module path which you would delete" exit 1 fi if [[ ! -d $bundle ]]; then echo "please input right module path" exit 1 fi git submodule deinit -f "$bundle" git rm -rf "$bundle" rm -rf .git/modules/$bundle git status