Skip to content

Commit b7ccf05

Browse files
committed
Replace legacy syntax as advised by shellcheck
No functional changes intended
1 parent 23c2074 commit b7ccf05

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

debian/src/dj_upgrade_chroot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ CHROOTDIR=/var/lib/domjudge/chroot
77
# To prevent (libc6) upgrade questions:
88
export DEBIAN_FRONTEND=noninteractive
99

10-
if [ `id -u` != 0 ]; then
10+
if [ "$(id -u)" != 0 ]; then
1111
echo "Warning: you probably need to run this program as root."
1212
fi
1313

docker-contributor/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN ln -sf /dev/stdout /var/log/nginx/access.log \
4949
# Set up users
5050
RUN useradd -m domjudge \
5151
&& groupadd domjudge-run \
52-
&& for id in `seq 0 4`; do useradd -d /nonexistent -g nogroup -s /bin/false domjudge-run-$id; done
52+
&& for id in $(seq 0 4); do useradd -d /nonexistent -g nogroup -s /bin/false domjudge-run-$id; done
5353

5454
# Install composer
5555
RUN apt update && \

docker-contributor/scripts/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ do
7575
if ! mysqlshow -u"${MYSQL_USER}" -p"${MYSQL_PASSWORD}" -h"${MYSQL_HOST}" "${MYSQL_DATABASE}" > /dev/null 2>&1
7676
then
7777
echo "MySQL database ${MYSQL_DATABASE} not yet found on host ${MYSQL_HOST};"
78-
let "DB_UP--"
78+
(( DB_UP-- ))
7979
sleep 30s
8080
else
8181
DB_UP=0

docker/domserver/scripts/start.d/50-domjudge.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ do
198198
if ! mysqlshow -u"${MYSQL_USER}" -p"${MYSQL_PASSWORD}" -h"${MYSQL_HOST}" "${MYSQL_DATABASE}" > /dev/null 2>&1
199199
then
200200
echo "MySQL database ${MYSQL_DATABASE} not yet found on host ${MYSQL_HOST};"
201-
let "DB_UP--"
201+
(( DB_UP-- ))
202202
sleep 10s
203203
else
204204
DB_UP=0

0 commit comments

Comments
 (0)