3 # A nice little script written by Matt Howard that will
4 # convert old style Bacula FileSets into the new style.
6 # fileset_convert.pl bacula-dir.conf >output-file
15 return "Options { ".join('; ',split(/\s+/, shift)) . " } ";
19 return join($/, map {" File = $_"} split(/\n\s*/, shift));
22 $in =~ s/Include\s*=\s*((?:\w+=\w+\s+)*){\s*((?:.*?\n)+?)\s*}/
24 ( $1 ? options($1) : '' ) . "\n" .
28 $in =~ s/Exclude\s*=\s*{\s*}/
31 $in =~ s/Exclude\s*=\s*{\s*((?:.*?\n)+?)\s*}/
32 "Exclude {\n" . file_lines($1) . "\n }"/eg;