From eea9f714cb8e1c0017e46656c47c917bd0107d41 Mon Sep 17 00:00:00 2001 From: jakeg00dwin Date: Sat, 2 Mar 2024 11:06:28 -0800 Subject: [PATCH] added body to the git_remove_module() function(untested rn). --- otto.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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 }