- Timestamp:
- Apr 4, 2012, 5:14:51 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
projects/md2mb/devel/md2mb/bin/md2mb.pl
r1450 r1451 37 37 if (@default_profiles) { undef $profile } 38 38 my $subdir; 39 my $touch = 0; 39 40 40 41 # parse command-line options … … 47 48 'profile|p=s' => \$profile, 48 49 'subdir|s=s' => \$subdir, 50 'touch|t' => \$touch, 49 51 ) or pod2usage(2); 50 52 pod2usage(1) if ($help); … … 86 88 } 87 89 find(\&md2mb,($oldroot)); 90 91 # now go back again and create empty files corresponding to the `.sbd' 92 # directories 93 if ($touch) { 94 print "DESCENDING AGAIN INTO oldroot($oldroot)\n" if ($debug); 95 find(sub { 96 return if (! -d); # consider only directories ... 97 return if (! /\.sbd$/); # ... with the right name 98 s/\.sbd//; # strip .sbd suffix 99 if ($debug) { 100 print "WOULD CREATE file($_) IF NEEDED\n"; 101 } else { 102 open my $fh, '>>', $_ or die "cannot open $_: $!"; 103 } 104 }, $newroot); 105 } 88 106 89 107 # rename `inbox' to `Inbox' … … 186 204 -subdir | -s subdir that will be created to hold the 187 205 imported mails 206 -touch | -t create empty files corresponding to .sdb dirs 188 207 189 208 =head1 OPTIONS … … 226 245 profile to hold the imported mails. This option is mandatory; there is no 227 246 default. 247 248 =item B<-touch> 249 250 Create empty files corresponding to the F<.sbd> dirs created by this script. 251 Use this hack if your mails don't show up in Thunderbird. 228 252 229 253 =back … … 267 291 above. 268 292 293 If you have used a structure with subfolders in KMail, mails in subfolders 294 might not show up in Thunderbird. Remove the import, and run again with 295 B<-touch>. 296 269 297 =head1 AUTHOR 270 298
Note:
See TracChangeset
for help on using the changeset viewer.