From f36076b2b303113ef4dba68c4175630ffc5367dd Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 17 Mar 2014 16:02:05 -0400 Subject: bootstrap-prepare.sh: Verify .opk checksums. --- diff --git a/bootstrap-prepare.sh b/bootstrap-prepare.sh index 48bc6d7..dabab0a 100755 --- a/bootstrap-prepare.sh +++ b/bootstrap-prepare.sh @@ -195,6 +195,12 @@ get_pkg() "${mirror}/feeds/dev/trunk/src/all/base/${filename}" filename="${filename##*/}" + + if ! printf '%s %s\n' "${sha256sum}" "${filename}" | sha256sum -c; then + printf 'ERROR: Checksum of source package file failed!\n' >&2 + exit 1 + fi + pkg_ver="${filename#src-}" pkg_ver="${pkg_ver%_src_all.opk}" tar -xzOf "${filename}" data.tar.gz | tar -xz -- cgit v0.9.1