diff options
author | Jacob Pipkin <j@dawnrazor.net> | 2012-11-04 12:37:45 -0600 |
---|---|---|
committer | Jacob Pipkin <j@dawnrazor.net> | 2012-11-04 12:37:45 -0600 |
commit | 7697c34d09d9e8d225e9be4a9a7efabd16e3306c (patch) | |
tree | 13bfe6d9002bc359eede337d0a22b6457daaf4f2 /SBO-Lib/lib | |
parent | d65db2b251e09a1f56bec3aa09ac764e7c7f9d6f (diff) | |
download | sbotools2-7697c34d09d9e8d225e9be4a9a7efabd16e3306c.tar.xz |
ditch prototype for compare_md5s
Diffstat (limited to 'SBO-Lib/lib')
-rw-r--r-- | SBO-Lib/lib/SBO/Lib.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm index c579e67..3968c66 100644 --- a/SBO-Lib/lib/SBO/Lib.pm +++ b/SBO-Lib/lib/SBO/Lib.pm @@ -398,7 +398,7 @@ sub compute_md5sum ($) { return $md5sum; } -sub compare_md5s ($$) { +sub compare_md5s { exists $_[1] or script_error 'compare_md5s requires two arguments.'; my ($first, $second) = @_; return $first eq $second ? 1 : undef; @@ -413,7 +413,7 @@ sub verify_distfile ($$) { return unless -d $distfiles; return unless -f $filename; my $md5sum = compute_md5sum $filename; - return compare_md5s $info_md5sum, $md5sum; + return compare_md5s ($info_md5sum, $md5sum); } # for a given distfile, attempt to retrieve it and, if successful, check its @@ -428,7 +428,7 @@ sub get_distfile ($$) { die "Unable to wget $link\n"; my $md5sum = compute_md5sum $filename; # can't do anything if the link in the .info doesn't lead to a good d/l - compare_md5s $md5sum, $exp_md5 or die "md5sum failure for $filename.\n"; + compare_md5s ($md5sum, $exp_md5) or die "md5sum failure for $filename.\n"; return 1; } |