#!/usr/bin/env bash NETTLE=nettle-3.7.2 rm -rf ${NETTLE} if ! wget -O nettle-3.7.2.tar.gz https://ftp.gnu.org/gnu/nettle/${NETTLE}.tar.gz ; then echo "Failed to download Nettle" exit 1 fi if ! gzip -d < ${NETTLE}.tar.gz | tar xf - ; then echo "Failed to unpack Nettle" exit 1 fi cd nettle-3.7.2 || exit 1 if ! ./configure --enable-fat --disable-sha-ni ; then echo "Failed to configure Nettle" exit 1 fi dd if=/dev/urandom of=sha1-compress.asm count=1024 dd if=/dev/urandom of=sha256-compress.asm count=1024 if ! make -j 4 ; then echo "Failed to build Nettle" exit 1 fi if ! make check ; then echo "Failed to test Nettle" exit 1 fi exit 0