From 5234c4dab37639f05bc5820e0b767b6fa8513137 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Sun, 12 Jul 2015 12:22:00 -0400 Subject: download/flashrom: Verify checksums of downloaded files --- (limited to 'resources/scripts/helpers/download') diff --git a/resources/scripts/helpers/download/flashrom b/resources/scripts/helpers/download/flashrom index a44dd45..2262f63 100755 --- a/resources/scripts/helpers/download/flashrom +++ b/resources/scripts/helpers/download/flashrom @@ -39,10 +39,18 @@ rm -Rf "flashrom/" # download it using subversion svn co -r 1889 svn://flashrom.org/flashrom/trunk flashrom -# apply patches - cd "flashrom/" +# Verify checksums of the downloaded files +# ------------------------------------------------------------------------------ + +sha512sum -c "../resources/scripts/helpers/sha512sums/flashrom" || (cd "../" && rm -Rf "flashrom/" && printf "Invalid checksums for flashrom\n" && exit 1) + +printf "Valid checksums for flashrom\n" + +# Apply patches +# ------------------------------------------------------------------------------ + printf "Enabling whitelist for X200S, X200 Tablet, T400, T500 and R400\n" patch "board_enable.c" < "../resources/flashrom/patch/x200s_x200t_t400_t500_r400_whitelist.diff" -- cgit v0.9.1