Address shellcheck warnings

This commit is contained in:
Cyb3r-Jak3 2024-09-09 17:45:48 -04:00
parent e471edd93a
commit 3f762da1e6
No known key found for this signature in database
11 changed files with 68 additions and 34 deletions

View file

@ -1,27 +1,58 @@
# Use carlosedp/golang for riscv64 support
FROM golang:1.21-bookworm AS build
FROM golang:1.23 AS build
# Install dependencies
RUN apt-get update && apt-get install -y git build-essential libsecret-1-dev
# RUN apt-get update && apt-get install -y git build-essential libsecret-1-dev
RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
--mount=target=/var/cache/apt,type=cache,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get -y --no-install-recommends install \
libc6 \
socat \
pass \
ca-certificates \
wget \
binutils \
xz-utils \
libsecret-1-0 \
libgl1
# Build
WORKDIR /build/
COPY build.sh VERSION /build/
RUN bash build.sh
RUN --mount=type=cache,target=/root/.cache/go-build bash build.sh
FROM ubuntu:jammy
FROM ubuntu:noble
LABEL maintainer="Xiaonan Shen <s@sxn.dev>"
EXPOSE 25/tcp
EXPOSE 143/tcp
# Install dependencies and protonmail bridge
# RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
# --mount=target=/var/cache/apt,type=cache,sharing=locked \
# rm -f /etc/apt/apt.conf.d/docker-clean \
# && apt-get update \
# && apt-get -y --no-install-recommends install \
# libc6 socat pass libsecret-1-0 ca-certificates
RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
--mount=target=/var/cache/apt,type=cache,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get -y --no-install-recommends install \
libc6 socat pass libsecret-1-0 ca-certificates
libc6 \
socat \
pass \
ca-certificates \
wget \
binutils \
xz-utils \
libsecret-1-0 \
libgl1
# Copy bash scripts
COPY gpgparams entrypoint.sh /protonmail/

View file

@ -1 +1 @@
3.12.0
3.13.0

View file

@ -2,12 +2,12 @@
set -ex
VERSION=`cat VERSION`
VERSION=$(cat VERSION)
# Clone new code
git clone https://github.com/ProtonMail/proton-bridge.git
cd proton-bridge
git checkout v$VERSION
git checkout v"$VERSION"
ARCH=$(uname -m)
if [[ $ARCH == "armv7l" ]] ; then

View file

@ -16,7 +16,7 @@ if [[ $1 == init ]]; then
pkill protonmail-bridge || true
# Login
/protonmail/proton-bridge --cli $@
"/protonmail/proton-bridge" --cli "$@"
else
@ -30,6 +30,6 @@ else
# Fake a terminal, so it does not quit because of EOF...
rm -f faketty
mkfifo faketty
cat faketty | /protonmail/proton-bridge --cli $@
cat faketty | /protonmail/proton-bridge --cli "$@"
fi