Skip to content

Commit

Permalink
Use sh/POSIX expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewFerr committed Feb 5, 2024
1 parent 1c641e2 commit 8194cd9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY . /build
WORKDIR /build
ARG DBG=0
RUN <<EOF
if [[ $DBG -eq 1 ]]; then
if [ "$DBG" = 1 ]; then
go install github.com/go-delve/delve/cmd/dlv@latest
else
touch /go/bin/dlv
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apk add --no-cache git ca-certificates build-base su-exec olm-dev bash jq yq
COPY . /build
WORKDIR /build
ARG DBG=0
if [[ $DBG -eq 1 ]]; then
if [ "$DBG" = 1 ]; then
go install github.com/go-delve/delve/cmd/dlv@latest
else
touch /go/bin/dlv
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
if [[ $DBG -eq 1 ]]; then
if [ "$DBG" = 1 ]; then
GO_GCFLAGS='all=-N -l'
else
GO_LDFLAGS="-s -w ${GO_LDFLAGS}"
Expand Down
4 changes: 2 additions & 2 deletions docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ fixperms

EXE=/usr/bin/mautrix-whatsapp
DLV=/usr/bin/dlv
if [[ -x $DLV ]]; then
if [[ $DBGWAIT -ne 1 ]]; then
if [ -x "$DLV" ]; then
if [ "$DBGWAIT" != 1 ]; then
NOWAIT=1
fi
EXE="${DLV} exec ${EXE} ${NOWAIT:+--continue --accept-multiclient} --api-version 2 --headless -l :4040"
Expand Down

0 comments on commit 8194cd9

Please sign in to comment.