File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,8 +53,10 @@ RUN ARCH=$(dpkg --print-architecture) && \
5353 TARBALL="gohttpserver_1.3.0_linux_${GHS_ARCH}.tar.gz" && \
5454 curl -fsSL "https://github.com/codeskyblue/gohttpserver/releases/download/1.3.0/${TARBALL}" \
5555 -o "/tmp/${TARBALL}" && \
56- curl -fsSL "https://github.com/codeskyblue/gohttpserver/releases/download/1.3.0/gohttpserver_1.3.0_checksums.txt" \
57- | grep "${TARBALL}" | sha256sum --check --status && \
56+ EXPECTED=$(curl -fsSL "https://github.com/codeskyblue/gohttpserver/releases/download/1.3.0/gohttpserver_1.3.0_checksums.txt" \
57+ | grep "${TARBALL}" | awk '{print $1}' ) && \
58+ ACTUAL=$(sha256sum "/tmp/${TARBALL}" | awk '{print $1}' ) && \
59+ [ "$EXPECTED" = "$ACTUAL" ] || (echo "Checksum mismatch for ${TARBALL}" && exit 1) && \
5860 tar -xz -C /usr/local/bin --strip-components=0 -f "/tmp/${TARBALL}" gohttpserver && \
5961 chmod +x /usr/local/bin/gohttpserver && \
6062 rm "/tmp/${TARBALL}"
You can’t perform that action at this time.
0 commit comments