X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=match_fingerprints;h=4c7748033b3ba9e9f2e588c42992168c2fa9e819;hp=33919c60d0fe3872a692627568bbf2bd8f851c11;hb=7b6f5557a05fa7e4cd09f433398ea4f6368ae519;hpb=6a858397936095b56100e4ad41374f166a20375a diff --git a/match_fingerprints b/match_fingerprints index 33919c6..4c77480 100755 --- a/match_fingerprints +++ b/match_fingerprints @@ -1,4 +1,22 @@ #!/usr/bin/perl + +# Copyright 2009-2012, Equinox Software, Inc. +# +# 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 the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + use strict; use warnings; use open ':utf8'; @@ -94,6 +112,9 @@ sub dump_records { die "Collision: lead in sub list ", $rec->{id}, "\n" if $subs{ $rec->{id} }; + # we don't want subs below threshold + next if ($_ < $conf->{threshold}); + # still here? output. print OUT $rec->{id}, "\t$_\n" } @@ -109,6 +130,7 @@ sub initialize { my $rc = GetOptions( $c, 'output|o=s', + 'threshold|t=i', 'help|h', ); show_help() unless $rc; @@ -122,11 +144,13 @@ sub initialize { print "Required option: ", join(', ', @missing), " missing!\n"; show_help(); } + + $c->{threshold} = 0 unless $c->{threshold}; } sub show_help { print <