parent
6b2d7997ce
commit
e8c3869093
@ -1,7 +1,15 @@ |
|||||||
#Compiles the entire program then runs it, producing an executable. |
#Compiles the entire program then runs it, producing an executable. If the "test" argument is included, will try and run tests too (in the test folder) |
||||||
#C++ |
#C++ |
||||||
printf "Running program...\n\n\n" |
printf "Running program...\n\n\n" |
||||||
if g++ $(find . -type f -name "*.cpp") ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then |
if [ "$1" = "test" ] |
||||||
./${PROJECT_NAME} "$@" |
then |
||||||
|
printf "Running tests...\n" |
||||||
|
if g++ $(find . -type f -name "*.cpp") ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then |
||||||
|
./${PROJECT_NAME} "$@" |
||||||
|
fi |
||||||
|
else |
||||||
|
if g++ $(find . -type f -name "*.cpp" -not -path "./test/*") ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then |
||||||
|
./${PROJECT_NAME} "$@" |
||||||
|
fi |
||||||
fi |
fi |
||||||
printf "\n\n" |
printf "\n\n" |
||||||
|
Loading…
Reference in new issue