Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:08:34

0001 #!/usr/bin/env perl
0002 use DirHandle;
0003 use File::Copy;
0004 $oldfile = @ARGV[0];
0005 $destination = @ARGV[1];
0006 open( INFILE, "$oldfile") || die "ERROR::could not open input file $oldfile";
0007 while( $record = <INFILE> )
0008 {
0009 
0010     if($record =~ /SEAL_PLUGINS=/){
0011     @tok1 = split(/=\"/, $record);
0012     print "@tok1\n";
0013     #pop(@tok1);
0014     #pop(@tok1);
0015     @tok1[1] =~ s/\";\n//;
0016     print "going to symlink from\n";
0017     print "@tok1[1]\n";
0018     mkdir ($destination);
0019     opendir(MODULES,$destination);
0020     @tokens = split(/\:/,@tok1[1]);
0021     while($#tokens != -1)
0022     {
0023         if(@tokens[$#tokens] =~ /\$/)
0024         {}
0025         else
0026         {
0027         print "token $#tokens @tokens[$#tokens]\n";
0028         opendir(DIR, @tokens[$#tokens]);
0029         @dots = grep {(! /^\./) && (/\.reg/)} readdir(DIR);
0030         print "found $#dots \n";
0031         while($#dots != -1)
0032         {
0033             print " symlinking @tokens[$#tokens]\/@dots[$#dots]\n";
0034             copy("@tokens[$#tokens]\/@dots[$#dots]","$destination\/@dots[$#dots]");
0035             pop(@dots);
0036         }
0037         print "@dots\n";
0038         }
0039         pop(@tokens);
0040     }
0041     }
0042 }