summaryrefslogtreecommitdiff
path: root/Build/cdbuild/tar2find.pl
blob: 70e8925e87d4a86a7980207e9a12cda8ada3cf18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/local/bin/perl
while (@ARGV && ($List = $ARGV[0])) {
 print "Process $List\n";
 open(TMP,"$List");
  while (<TMP>) {
     chop;
     $found{$_} = 1;
     while ($_ ne "") {
      if (/(.*)\/(.*)/) { 
         $found{$1. "/"} = 0;   
         $found{$1} = 0;   
         $_=$1;
 	}
	else { last; }
     } 
 }
 close(TMP);
 open(TMP,">$List");
 foreach $key (sort keys(%found)) {
   print TMP "$key\n" if ($found{$key} eq 1);
}
  close(TMP);
 shift(@ARGV);
}
;