summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-05-23 06:41:49 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-05-23 06:42:46 +0200
commit4d8618c208f0637321d153821c587f6e35959322 (patch)
tree28688ad8c1374cd8ac420e15142f78ef585ff4a6 /bin
parentd737f0e7bc48921960d8a101c4e8d17ec414896a (diff)
Add hashl -f update (update with unignore)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/hashl12
1 files changed, 10 insertions, 2 deletions
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<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 >>.