diff scripts/Docker/roundup_start @ 7678:095f379bf639

fix: do not use -a as argument to test Apparently now well defined. Suggest using if [ ... ] && [ ... ]; then rather than if [ ... -a ... ]; then with complex ... expressions. Courtesy of https://www.shellcheck.net/
author John Rouillard <rouilj@ieee.org>
date Tue, 24 Oct 2023 22:00:16 -0400
parents c7788bdd3760
children ccb5169ee6ee
line wrap: on
line diff
--- a/scripts/Docker/roundup_start	Tue Oct 24 21:55:24 2023 -0400
+++ b/scripts/Docker/roundup_start	Tue Oct 24 22:00:16 2023 -0400
@@ -102,7 +102,7 @@
 		# run demo make sure to set bind address -B to 0.0.0.0
 		# otherwise we can never make it out of the docker container.
 		# use -p to force port to match the exported docker port.
-		if [ -f tracker/demo/config.ini -a -z "$nuke" ]; then
+		if [ -f tracker/demo/config.ini ] && [ -z "$nuke" ]; then
 		    if [ "$demoArgs" -ne 0 ]; then
 			printf "Error: backend and template arguments to demo "
 			printf "are invalid if a tracker\nis configured and "
@@ -179,7 +179,7 @@
     # we have a valid config.ini so init database if not done
     # if we get errors, the db directory should be missing
     # and we print an error.
-    if [ $do_exit = 0 -a ! -e "$directory/db" ]; then
+    if [ $do_exit = 0 ] && ! [ -e "$directory/db" ]; then
 	printf "Initializing tracker %s\n" "$tracker"
         if ! roundup-admin -i "$directory" init; then
            # something went wrong.

Roundup Issue Tracker: http://roundup-tracker.org/