Skip to content

Commit

Permalink
Merge branch 'master' of github.com:gobolinux/Compile
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasvr committed Apr 28, 2017
2 parents 605f44c + deca2eb commit 1f000a4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bin/RecipeLint
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,10 @@ cat Recipe | perl -e '
files => "array",
file_size => "string",
file_md5 => "string",
file_sha => "string",
file_sizes => "array",
file_md5s => "array",
file_shas => "array",
uncompress => "string",
unpack_files => "string",
docs => "array",
Expand Down Expand Up @@ -532,14 +534,20 @@ test_urls() {
else
WARN "Type of archive $file not detected. No integrity check performed."
fi
if [ "$file_md5" ]
if [ "$file_sha" ]
then
msg "Checking SHA for $file..."
[ `sha256sum "$file" | cut -d" " -f1` = "$file_sha" ] || {
ERROR "SHA sum in recipe for $file does not match."
}
elif [ "$file_md5" ]
then
msg "Checking MD5 for $file..."
[ `md5sum "$file" | cut -d" " -f1` = "$file_md5" ] || {
ERROR "MD5 sum in recipe for $file does not match."
}
else
WARN "No MD5 sum in recipe."
WARN "No MD5/SHA sum in recipe."
fi
if [ "$file_size" ]
then
Expand Down

0 comments on commit 1f000a4

Please sign in to comment.