curl -f -L -o "${H2O_TARBALL}" "${H2O_TARBALL_URL}"
# Line below should echo two spaces between digest and name
-echo "${H2O_TARBALL_HASH}" "${H2O_TARBALL}" | sha256sum -c -
+if echo "${H2O_TARBALL_HASH} ${H2O_TARBALL}" | sha256sum -c -; then
+ true
+else
+ result=$?
+ echo "error: Downloaded ${H2O_TARBALL_URL} failed sha256sum validation"
+ exit $result
+fi
tar xf "${H2O_TARBALL}"
CFLAGS='-fPIC' cmake -DWITH_PICOTLS=off -DWITH_BUNDLED_SSL=off -DWITH_MRUBY=off -DCMAKE_INSTALL_PREFIX=/opt ./h2o-${H2O_VERSION}
make -j $(nproc)
curl -L -o "${MESON_TARBALL}" "${MESON_TARBALL_URL}"
echo $0: Checking that the hash of ${MESON_TARBALL} is ${MESON_TARBALL_HASH}
# Line below should echo two spaces between digest and name
-echo "${MESON_TARBALL_HASH}"" ""${MESON_TARBALL}" | sha256sum -c -
+if echo "${MESON_TARBALL_HASH} ${MESON_TARBALL}" | sha256sum -c -; then
+ true
+else
+ result=$?
+ echo "error: Downloaded ${MESON_TARBALL_URL} failed sha256sum validation"
+ exit $result
+fi
tar xf "${MESON_TARBALL}"
cd "meson-${MESON_VERSION}"
curl -L -o "${QUICHE_TARBALL}" "${QUICHE_TARBALL_URL}"
echo $0: Checking that the hash of ${QUICHE_TARBALL} is ${QUICHE_TARBALL_HASH}
# Line below should echo two spaces between digest and name
-echo "${QUICHE_TARBALL_HASH}"" ""${QUICHE_TARBALL}" | sha256sum -c -
+if echo "${QUICHE_TARBALL_HASH} ${QUICHE_TARBALL}" | sha256sum -c -; then
+ true
+else
+ result=$?
+ echo "error: Downloaded ${QUICHE_TARBALL_URL} failed sha256sum validation"
+ exit $result
+fi
tar xf "${QUICHE_TARBALL}"
cd "quiche-${QUICHE_VERSION}"
# Disable SONAME in the quiche shared library, we do not intend this library to be used by anyone else and it makes things more complicated since we rename it to libdnsdist-quiche
fi
echo $0: Expecting hash $VALUE
# Line below should echo two spaces between digest and name
-echo $VALUE" "$RUST_TARBALL | sha256sum -c -
+if echo "${VALUE} ${RUST_TARBALL}" | sha256sum -c -; then
+ true
+else
+ result=$?
+ echo "error: Downloaded ${SITE}/${RUST_TARBALL} failed sha256sum validation"
+ exit $result
+fi
rm -rf $RUST_VERSION
tar -Jxf $RUST_TARBALL
cd $RUST_VERSION