From: Kevin Day Date: Mon, 6 Jun 2022 00:21:48 +0000 (-0500) Subject: Bugfix: When any of -c, -p, or -s is the last parameter in test.sh no error is thrown. X-Git-Tag: 0.5.10~65 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=d0bffd5e157778fa882975e2be182c424257f424;p=fll Bugfix: When any of -c, -p, or -s is the last parameter in test.sh no error is thrown. These must have an error because they expect an additional argument. Change the behavior of the code to cause an error in this cases. I took the lazy way out and just set the variables to trigger an error rather than implementing a specific error handler for these cases. --- diff --git a/build/scripts/test.sh b/build/scripts/test.sh index 9b71799..3c6c847 100644 --- a/build/scripts/test.sh +++ b/build/scripts/test.sh @@ -102,8 +102,10 @@ test_main() { build_project=yes elif [[ $p == "-s" || $p == "--path_scripts" ]] ; then grab_next=path_scripts + path_scripts= elif [[ $p == "-t" || $p == "--path_test" ]] ; then grab_next=path_test + path_test= elif [[ $test_system == "" ]] ; then test_system="$p" else @@ -154,7 +156,7 @@ test_main() { test_system=normal fi - if [[ $build_compiler == "" ]] ; then + if [[ $grab_next != "build_compiler" && $build_compiler == "" ]] ; then build_compiler=gcc fi