ITK/Release 4/Wrapping/Tasks/WrapITKModular: Difference between revisions
From KitwarePublic
Jump to navigationJump to search
Line 2: | Line 2: | ||
== Mapping of files == | == Mapping of files == | ||
== Script used to obtain the mapping == | == Script used to obtain the mapping == |
Revision as of 00:48, 1 June 2011
Modular WrapITK
Mapping of files
Script used to obtain the mapping
#!/usr/bin/perl -w require 5.004; $fname = "Ashish_AllWrapFiles"; $outname = "Ashish_ModFiles"; # First, prepare the input file open(FILE2, ">$fname") || die "Could not open $fname\n"; system("find . -name \*\.wrap >> $fname") == 0 || die "system error $?"; close(FILE2); # Next, process and write it in the output file open(FILE, "$fname") || die "Could not open $fname\n"; open (OUTPUT, ">$outname") || die "Could not open $outname\n"; #$pattern = '^\.\/Wrapping\/WrapITK\/Libraries\/(\w*)\/(\w*)\.wrap'; $pattern = '^\.\/(((\w*)\/)+)(\w*)\.wrap'; while ($line = <FILE>) { chomp($line); if($line=~/$pattern/) { system("find . -name \'$4.h\' >> $outname") == 0 || die "system error $?"; } } close(FILE); close(OUTPUT);