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:
parent
fde740fdf5
commit
f6330c7eec
22
tdd.sh
22
tdd.sh
|
@ -12,6 +12,18 @@ clear_cmake_cache () {
|
|||
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 () {
|
||||
echo "ERROR: Currently no toolchain / target!"
|
||||
}
|
||||
|
@ -42,11 +54,12 @@ print_menu () {
|
|||
echo "2. Build Project"
|
||||
echo "3. Build for release"
|
||||
echo "4. cross compile for XXXXXX"
|
||||
echo "5. Exit"
|
||||
echo "5. Add new module to project"
|
||||
echo "6. Exit"
|
||||
}
|
||||
|
||||
|
||||
menu () {
|
||||
main() {
|
||||
valid_choice=false
|
||||
|
||||
while [ "$valid_choice" != true ]; do
|
||||
|
@ -75,6 +88,11 @@ menu () {
|
|||
cross_compile
|
||||
;;
|
||||
5)
|
||||
echo "You selected Option 5"
|
||||
valid_choice=true
|
||||
add_new_module
|
||||
;;
|
||||
6)
|
||||
echo "Exiting..."
|
||||
exit 0
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue