-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsrcclasses
More file actions
executable file
·63 lines (53 loc) · 1.51 KB
/
srcclasses
File metadata and controls
executable file
·63 lines (53 loc) · 1.51 KB
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
#! /usr/bin/perl
##
## This script generates a list of classes to be compiled into either
## Multigraph.swc or Multigraph.swf by examining the contents of the
## "src" directory and excluding certain files contained therein which
## should not be included for various reasons.
##
## usage:
##
## srcclasses { SWC | SWF }
##
$target = uc(shift);
if (!$target) {
die "usage: srcclasses { SWC | SWF }\n";
}
@asfiles = src_files("as");
@mxmlfiles = src_files("mxml");
@classes = ();
foreach $file (@mxmlfiles, @asfiles) {
if (($target eq "SWC") && ($file eq "MultigraphApp.mxml")) { next; }
if ($file eq "MultigraphTest.mxml") { next; }
if ($file eq "StaticImports.as") { next; }
if ($file =~ /saui/) { next; }
if ($file =~ /holding/) { next; }
if ($file =~ m|Mock|) { next; }
if ($file =~ m|/Old|) { next; }
$file =~ s|.mxml$||;
$file =~ s|.as$||;
$file =~ s|/|\.|g;
push(@classes, $file);
}
foreach $f (@classes) {
printf("%s\n", $f);
}
exit;
########################################################################
sub src_files {
my $suffix = shift;
@files = ();
open(FIND, "find src -name '*.$suffix' -print |");
while (my $file = <FIND>) {
chomp($file);
if ($file =~ m|/generated/|) { next; }
if ($file =~ m|/edu/|) { next; }
if ($file =~ m|WeatherForecasts|) { next; }
if ($file =~ /\.$suffix$/) {
$file =~ s|^src/||;
push(@files, $file);
}
}
close(FIND);
return @files;
}