-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswcclasses
More file actions
executable file
·51 lines (44 loc) · 1.32 KB
/
swcclasses
File metadata and controls
executable file
·51 lines (44 loc) · 1.32 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
#! /usr/bin/perl
##
## This script generates a list of classes to be compiled into Multigraph.swc
## by examining the contents of the "src" directory and excluding certain files
## contained therein which should not be included for various reasons.
##
@asfiles = src_files("as");
@mxmlfiles = src_files("mxml");
@classes = ();
foreach $file (@mxmlfiles, @asfiles) {
if ($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;
}