Changeset 1390 in ProjectBuilder


Ignore:
Timestamp:
Jan 8, 2012, 2:42:33 AM (12 years ago)
Author:
Bruno Cornec
Message:
  • Fix the RE which wasn't capturing all subdirectories .directories correctly for md2mb.pl
  • MOve the inbox file into Inbox in case it doesn't exist
File:
1 edited

Legend:

Unmodified
Added
Removed
  • projects/md2mb/devel/md2mb/bin/md2mb.pl

    r1389 r1390  
    1313# CHANGE AS YOU WISH
    1414my $oldroot = "/users/segolene/.Mail";
    15 my $newroot = "/users/segolene/.thunderbird/60q6hqwp.default/Mail/pop.home.musique-ancienne.org/";
     15my $newroot = "/users/segolene/.thunderbird/qk2f4dl6.default/Mail/pop.home.musique-ancienne.org/";
    1616# Is the newroot a file (1) or a dir (0)
    1717my $nrisfile = 0;
     
    3030
    3131find(\&md2mb,($oldroot));
     32
     33if ((-z "$newroot/Inbox") || (! -e "$newroot/Inbox")) {
     34    print "Renaming inbox into Inbox\n";
     35    move("$newroot/inbox","$newroot/Inbox") if (-e "$newroot/inbox");
     36}
    3237
    3338sub md2mb {
     
    5358$destname =~ s|^$oldroot||;
    5459# Target name is not under a .directory dir but under a .sdb one
    55 $destname =~ s|\.([[:alnum:]éèçàù\s]*)\.directory|$1.sbd|g;
     60$destname =~ s|\.([^/]+)\.directory/|$1.sbd/|g;
    5661# Here we create the target dir and target name
    5762my $cdir = dirname("$newroot/$destname");
Note: See TracChangeset for help on using the changeset viewer.