diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-05-23 06:41:49 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-05-23 06:42:46 +0200 |
commit | 4d8618c208f0637321d153821c587f6e35959322 (patch) | |
tree | 28688ad8c1374cd8ac420e15142f78ef585ff4a6 /bin | |
parent | d737f0e7bc48921960d8a101c4e8d17ec414896a (diff) |
Add hashl -f update (update with unignore)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/hashl | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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<dbfile> 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 >>. |