summaryrefslogtreecommitdiff
path: root/lib/sbin/BuildActiveThorns.pl
blob: c4b9808398e5c0cb7ac221790e49bd4f13609802 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#! /usr/bin/perl
#/*@@
#  @file      BuildActiveThorns.pl
#  @date      Tue Jan 19 14:02:07 1999
#  @author    Tom Goodale
#  @desc 
#  Creates an ActiveThornsList
#  @enddesc 
#  @version $Id$
#@@*/

$toolkit_dir = shift(@ARGV);

chdir $toolkit_dir;

open(TOOLKITS, "ls|");

while(<TOOLKITS>)
{
  chop;

  # Ignore CVS and backup stuff
  next if (m:^CVS$:);
  next if (m:^\#:);
  next if (m:~$:);

  # Just pick directories
  if( -d $_)
  {
    push (@toolkits, $_);
  }
}

close TOOLKITS;

foreach $toolkit (@toolkits)
{
  chdir $toolkit;

  open(THORNLIST, "ls|");
  
  while(<THORNLIST>)
  {
    chop;

    # Ignore CVS and backup stuff
    next if (m:^CVS$:);
    next if (m:^\#:);
    next if (m:~$:);

    # Just pick directories
    if( -d $_)
    {
      push(@total_thornlist, "$toolkit/$_");
    }
  }
  chdir "..";
}

foreach $thorn (@total_thornlist)
{
  print "$thorn\n";
}