comparison 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
comparison
equal deleted inserted replaced
7677:c7788bdd3760 7678:095f379bf639
100 done 100 done
101 101
102 # run demo make sure to set bind address -B to 0.0.0.0 102 # run demo make sure to set bind address -B to 0.0.0.0
103 # otherwise we can never make it out of the docker container. 103 # otherwise we can never make it out of the docker container.
104 # use -p to force port to match the exported docker port. 104 # use -p to force port to match the exported docker port.
105 if [ -f tracker/demo/config.ini -a -z "$nuke" ]; then 105 if [ -f tracker/demo/config.ini ] && [ -z "$nuke" ]; then
106 if [ "$demoArgs" -ne 0 ]; then 106 if [ "$demoArgs" -ne 0 ]; then
107 printf "Error: backend and template arguments to demo " 107 printf "Error: backend and template arguments to demo "
108 printf "are invalid if a tracker\nis configured and " 108 printf "are invalid if a tracker\nis configured and "
109 printf "'nuke' is not specified.\nExiting.\n" 109 printf "'nuke' is not specified.\nExiting.\n"
110 exit 1 110 exit 1
177 fi 177 fi
178 178
179 # we have a valid config.ini so init database if not done 179 # we have a valid config.ini so init database if not done
180 # if we get errors, the db directory should be missing 180 # if we get errors, the db directory should be missing
181 # and we print an error. 181 # and we print an error.
182 if [ $do_exit = 0 -a ! -e "$directory/db" ]; then 182 if [ $do_exit = 0 ] && ! [ -e "$directory/db" ]; then
183 printf "Initializing tracker %s\n" "$tracker" 183 printf "Initializing tracker %s\n" "$tracker"
184 if ! roundup-admin -i "$directory" init; then 184 if ! roundup-admin -i "$directory" init; then
185 # something went wrong. 185 # something went wrong.
186 # verify it looks like a tracker directory 186 # verify it looks like a tracker directory
187 # then remove the database directory 187 # then remove the database directory

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