X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=dupemerge;a=blobdiff_plain;f=dm6;fp=dm6;h=a3c7b9ea1541662ef0f5825b21a8f599b2d5bb58;hp=ff3a9eb2b57244eed3ac9c8d071ebf58c5afcbf9;hb=4f5affec900edd9b4b9acc4c390bfed4c91fb248;hpb=5d6afd72794a9be8dcf2040fd4cad7fb1ad75cd6 diff --git a/dm6 b/dm6 index ff3a9eb..a3c7b9e 100755 --- a/dm6 +++ b/dm6 @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Digest::SHA1 qw(sha1 sha1_hex sha1_base64); +use Digest::SHA qw(sha1 sha1_hex sha1_base64); use Fcntl qw(:DEFAULT :flock); use File::Compare; use File::Path; @@ -9,7 +9,7 @@ use File::Temp; use File::stat; use MIME::Base64; -# Copyright (C) 2010 Zygo Blaxell +# Copyright (C) 2010-2012 Zygo Blaxell # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ use MIME::Base64; sub digest { my ($filename) = (@_); die "'$filename' is not a plain file" if (-l $filename) || ! (-f _); - my $ctx = Digest::SHA1->new; + my $ctx = Digest::SHA->new; sysopen(FILE, $filename, O_RDONLY|O_NONBLOCK) or die "open: $filename: $!"; binmode(FILE); # FIXME: Necessary? Probably harmless... $ctx->addfile(\*FILE); @@ -41,7 +41,7 @@ sub usage { Usage: $0 link-dir Hashes a NUL-separated list of files on stdin into link-dir. -Version: 0.20101024 +Version: 0.20120914 USAGE }