blob: c593cc3a27d24fadc38721ebe9d00513ff3a0edd (
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
|
#!/usr/bin/perl -w
#
# Updates the version of YUI3 used by Bugzilla. Just pass the path to
# an unzipped yui release directory, like:
#
# contrib/new-yui3.pl /path/to/yui3/
#
use strict;
use File::Copy::Recursive qw(dircopy);
use File::Find;
use File::Basename;
my $SOURCE_PATH = shift;
my $DEST_PATH = shift;
dircopy("$SOURCE_PATH/build", $DEST_PATH) || die $!;
find(
sub {
my $delete = 0;
my $filename = basename $File::Find::name;
if ($filename =~ /-debug\.js$/
|| $filename =~ /-coverage\.js$/
|| $filename =~ /-skin\.css$/)
{
$delete = 1;
}
elsif ($filename =~ /-min\.js/) {
$filename =~ s/-min//;
$delete = 1;
}
return if !$delete;
print "deleting $filename\n";
unlink($filename) || die $!;
},
$DEST_PATH
);
|