mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-05-19 12:23:48 +02:00
Use sh/POSIX expressions
This commit is contained in:
parent
1c641e2f1c
commit
8194cd907a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
2
build.sh
2
build.sh
|
@ -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}"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue