diff --git a/otto.sh b/otto.sh index f15943c..9faee5f 100755 --- a/otto.sh +++ b/otto.sh @@ -65,7 +65,24 @@ git_add_module () { git_remove_module () { - echo "unfinished" + local basename="$1" + + read -p "Auto del from git?(y/n):" CHOICE + if [ "${CHOICE}" -eq "n" ]; then + echo "not being removed!" + return 0 + fi + + modsrc_dir="./src/${basename}" + modtest_dir="./tests/${basename}" + + # Now we add the new files to the git tracked files + git rm -r ${modsrc_dir}/* + git rm -r ${modsrc_dir} + git rm -r ${modtest_dir}/* + git rm -r ${modtest_dir} + git rm -r ./src/CMakeLists.txt + git rm -r ./tests/CMakeLists.txt }