Skip to content

Commit ea0a4a4

Browse files
committed
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/
1 parent 2deff96 commit ea0a4a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/Docker/roundup_start

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ for tracker_spec in "$@"; do
102102
# run demo make sure to set bind address -B to 0.0.0.0
103103
# otherwise we can never make it out of the docker container.
104104
# 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
106106
if [ "$demoArgs" -ne 0 ]; then
107107
printf "Error: backend and template arguments to demo "
108108
printf "are invalid if a tracker\nis configured and "
@@ -179,7 +179,7 @@ parameters.\n" "$directory"
179179
# we have a valid config.ini so init database if not done
180180
# if we get errors, the db directory should be missing
181181
# and we print an error.
182-
if [ $do_exit = 0 -a ! -e "$directory/db" ]; then
182+
if [ $do_exit = 0 ] && ! [ -e "$directory/db" ]; then
183183
printf "Initializing tracker %s\n" "$tracker"
184184
if ! roundup-admin -i "$directory" init; then
185185
# something went wrong.

0 commit comments

Comments
 (0)