3 DETECTCOLL='lib/collissiondetect'
4 DETECTCOLL_URL='https://marc-stevens.nl/research/software/download.php?file=libdetectcoll-0.2.zip'
6 # Download source archive ...
7 wget -q -O "$DETECTCOLL/source.zip" "$DETECTCOLL_URL" || exit 1
9 #echo > "$DETECTCOLL/source.zip"
11 # Check SHA-512 and Whirlpool digests ...
12 echo "Verification (SHA-512) ..."
13 [ "d72153f1592628e31201cde17ce97f17fc83aeb65a6db075dfe1f21686d28e8068987215996c5c36f067819d16896fc75f7d990bf26cdb1472d61bf1b1d3c96c" = "$(sha512sum "$DETECTCOLL/source.zip"|cut '-d ' -f1)" ] || exit 2
15 echo "Verification (Whirlpool) ..."
16 [ "eaa3570095f3b60173241d9990c8da4b5bae5ef5f85880015918707275cb1cd556e6176d72c651085f05c8a2560d46431c5236acd116a7a862e128b0e35f3e37" = "$(openssl whirlpool -hex -r "$DETECTCOLL/source.zip"|cut '-d ' -f1)" ] || exit 2
19 echo "Unzipping $DETECTCOLL/source.zip ..."
22 mv libdetectcoll-*/ "libdetectcoll"
25 # Sorting extracted files ...
26 echo "Moving things around $DETECTCOLL/source.zip ..."
27 pushd "$DETECTCOLL/libdetectcoll"
31 mv libdetectcoll.c ../lib/
32 mv libdetectcoll.h ../lib/
43 echo "Cleaning up ..."
44 rm -r "$DETECTCOLL/libdetectcoll"