summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2014-03-17 16:02:05 (EDT)
committer P. J. McDermott <pjm@nac.net>2014-03-17 16:02:05 (EDT)
commitf36076b2b303113ef4dba68c4175630ffc5367dd (patch)
tree7230e1cb9dc5eaade9ba8cc2960efb4bbbc448fd
parent3b179991275a2ab04fe2c46e2757ee0e8291cf6a (diff)
bootstrap-prepare.sh: Verify .opk checksums.
-rwxr-xr-xbootstrap-prepare.sh6
1 files changed, 6 insertions, 0 deletions
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