protonmail-bridge-nextcoud-.../build/build.sh

22 lines
665 B
Bash
Raw Normal View History

2020-06-01 13:51:24 +00:00
#!/bin/bash
2025-01-04 00:47:52 +00:00
set -eoux pipefail
2020-06-01 13:51:24 +00:00
VERSION=`cat VERSION`
# Clone new code
2025-01-04 00:47:52 +00:00
git clone https://github.com/ProtonMail/proton-bridge.git --depth 1 --branch v$VERSION
2020-06-01 13:51:24 +00:00
cd proton-bridge
ARCH=$(uname -m)
if [[ $ARCH == "armv7l" ]] ; then
# This is expected to fail, and we use the following patch to fix
make build-nogui || true
# For 32bit architectures, there was a overflow error on the parser
# This is a workaround for this problem found at:
# https://github.com/antlr/antlr4/issues/2433#issuecomment-774514106
find $(go env GOPATH)/pkg/mod/github.com/\!proton\!mail/go-rfc5322*/ -type f -exec sed -i.bak 's/(1<</(int64(1)<</g' {} +
fi
# Build
make build-nogui