diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2012-12-04 22:13:12 +0100 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2012-12-04 22:13:12 +0100 |
commit | 1ee605864f227d40cc83e798dc117ad8e01acb64 (patch) | |
tree | 42cc3ff5007202fad4932941b477ac96d5ea0643 /contrib | |
parent | b061ce481380dfd01f85ea84ef700eb7589433e3 (diff) | |
download | bugzilla-1ee605864f227d40cc83e798dc117ad8e01acb64.tar.gz bugzilla-1ee605864f227d40cc83e798dc117ad8e01acb64.tar.xz |
Bug 818091 - Install a full copy of YUI3 into the js directory for use with new extensions/projects
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/new-yui3.pl | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/contrib/new-yui3.pl b/contrib/new-yui3.pl new file mode 100755 index 000000000..c593cc3a2 --- /dev/null +++ b/contrib/new-yui3.pl @@ -0,0 +1,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 +); |