added in a 6th option in the menu for the tdd.sh. The new function is for adding modules to the project.

This commit is contained in:
jakeg00dwin 2024-02-29 22:35:06 -08:00
parent fde740fdf5
commit f6330c7eec
1 changed files with 20 additions and 2 deletions

22
tdd.sh
View File

@ -12,6 +12,18 @@ clear_cmake_cache () {
rm -rf CMakeCache.txt CMakeFiles/ rm -rf CMakeCache.txt CMakeFiles/
} }
add_new_module () {
read -p "Enter the name of the module:" modname
modsrc_dir="./src/${modname}"
modtest_dir="./tests/${modname}"
echo "creating: ${modsrc_dir}, ${modtest_dir}"
mkdir $modsrc_dir
mkdir $modtest_dir
#copy the template files.
}
cross_compile () { cross_compile () {
echo "ERROR: Currently no toolchain / target!" echo "ERROR: Currently no toolchain / target!"
} }
@ -42,11 +54,12 @@ print_menu () {
echo "2. Build Project" echo "2. Build Project"
echo "3. Build for release" echo "3. Build for release"
echo "4. cross compile for XXXXXX" echo "4. cross compile for XXXXXX"
echo "5. Exit" echo "5. Add new module to project"
echo "6. Exit"
} }
menu () { main() {
valid_choice=false valid_choice=false
while [ "$valid_choice" != true ]; do while [ "$valid_choice" != true ]; do
@ -75,6 +88,11 @@ menu () {
cross_compile cross_compile
;; ;;
5) 5)
echo "You selected Option 5"
valid_choice=true
add_new_module
;;
6)
echo "Exiting..." echo "Exiting..."
exit 0 exit 0
;; ;;