Use sh/POSIX expressions

This commit is contained in:
Andrew Ferrazzutti 2024-02-05 10:20:38 -05:00
parent 1c641e2f1c
commit 8194cd907a
4 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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

View file

@ -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}"

View file

@ -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"