From 4d8618c208f0637321d153821c587f6e35959322 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 23 May 2011 06:41:49 +0200 Subject: Add hashl -f update (update with unignore) --- bin/hashl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bin/hashl') diff --git a/bin/hashl b/bin/hashl index ec93f24..ca81dcd 100755 --- a/bin/hashl +++ b/bin/hashl @@ -14,6 +14,7 @@ use Getopt::Long; use IO::Handle; use Time::Progress; +my $add_unignore = 0; my $base = getcwd(); my $rel_paths = 1; my $db_file = '.hashl.db'; @@ -33,6 +34,7 @@ STDERR->autoflush(1); GetOptions( 'd|database=s' => \$db_file, + 'f|force' => \$add_unignore, 'n|no-progress' => sub { $show_progress = 0 }, 's|read-size=i' => sub { $read_size = $_[1] * 1024 }, 'V|version' => sub { say "hashl version ${VERSION}"; exit 0 }, @@ -186,8 +188,9 @@ sub db_update { my ( $file, $path ) = @_; $hashl->add_file( - file => $file, - path => $path, + file => $file, + path => $path, + unignore => $add_unignore, ); return; @@ -467,6 +470,11 @@ directory. Use I instead of F<.hashl.db> +=item B<-f>|B<--force> + +For use with C<< hashl add >>: If there are ignored files in the directory, +unignore and add them. + =item B<-n>|B<--no-progress> Do not show progress information. Most useful with C<< hashl find-new >>. -- cgit v1.2.3