mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
Add pull by date and cvs flags options. Handle defaults better.
This commit is contained in:
parent
d686fa3f6e
commit
542be57ad8
@ -32,6 +32,20 @@ $chrome_color = '#F0A000';
|
||||
$CVSROOT = ':pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot';
|
||||
$ENV{PATH} = "$ENV{PATH}:/opt/cvs-tools/bin:/usr/local/bin"; # for cvs & m4
|
||||
|
||||
%defaults = (
|
||||
'MOZ_CO_MODULE', 'SeaMonkeyEditor',
|
||||
'MOZ_CO_BRANCH', 'HEAD',
|
||||
'MOZ_OBJDIR', '@TOPSRCDIR@',
|
||||
'MOZ_CVS_FLAGS', '-q -z 3',
|
||||
'MOZ_CO_FLAGS', '-P'
|
||||
);
|
||||
|
||||
# Set up pull by date
|
||||
#
|
||||
use POSIX qw(strftime);
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||
$pull_date = strftime("%d %b %Y %H:%M %Z",$sec,$min,$hour,$mday,$mon,$year);
|
||||
|
||||
|
||||
if ($query->param()) {
|
||||
&parse_params;
|
||||
@ -53,9 +67,9 @@ print "Content-type: text/html\n\n";
|
||||
#########################################################
|
||||
|
||||
sub parse_params {
|
||||
if ($query->param('MOZ_OBJDIR') eq '@TOPSRCDIR@') {
|
||||
$query->param(-name=>'MOZ_OBJDIR',
|
||||
-values=>['']);
|
||||
if ($query->param('pull_by_date') eq 'on') {
|
||||
my $pull_date = $query->param('pull_date');
|
||||
$query->param(-name=>'MOZ_CO_DATE', -values=>[ $pull_date ]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -173,9 +187,8 @@ sub print_script {
|
||||
my $value = $query->param($param);
|
||||
$value =~ s/\s+$//;
|
||||
$value =~ s/^\s+//;
|
||||
next if $value eq '';
|
||||
next if $param eq 'MOZ_CO_MODULE' and $value eq 'SeaMonkeyEditor';
|
||||
next if $param eq 'MOZ_CO_BRANCH' and $value eq 'HEAD';
|
||||
next if $value eq $defaults{$param};
|
||||
$value = "\"$value\"" if $value =~ /\s/;
|
||||
print "# Options for client.mk.\n" if not $have_client_mk_options;
|
||||
print "mk_add_options $param=".$value."\n";
|
||||
$have_client_mk_options = 1;
|
||||
@ -210,7 +223,7 @@ sub print_configure_form {
|
||||
<HEAD>
|
||||
<TITLE>Mozilla Unix Build Configurator</TITLE>
|
||||
</HEAD>
|
||||
<body BGCOLOR="#FFFFFF" TEXT="#000000"LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
|
||||
<body BGCOLOR="#FFFFFF" TEXT="#000000"LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000" onLoad='fillTime();'>
|
||||
|
||||
<FORM action='config.cgi' method='POST' name='ff'>
|
||||
<INPUT Type='hidden' name='preview' value='1'>
|
||||
@ -252,14 +265,28 @@ sub print_configure_form {
|
||||
<tr bgcolor="$chrome_color"><td>
|
||||
<font face="Helvetica,Arial"><b>Check out options:</b></font><br>
|
||||
</td></tr><tr><td>
|
||||
<table cellpadding=0 cellspacing=0><tr><td>
|
||||
<table cellpadding=0 cellspacing=0 width="100%"><tr><td>
|
||||
Check out module
|
||||
</td><td>
|
||||
<input type="text" name="MOZ_CO_MODULE" value="SeaMonkeyEditor">
|
||||
<input type="text" name="MOZ_CO_MODULE" value="$defaults{MOZ_CO_MODULE}">
|
||||
</td></tr><tr><td>
|
||||
Check out branch
|
||||
</td><td>
|
||||
<input type="text" name="MOZ_CO_BRANCH" value="HEAD">
|
||||
<input type="text" name="MOZ_CO_BRANCH" value="$defaults{MOZ_CO_BRANCH}">
|
||||
</td></tr><tr><td>
|
||||
CVS flags
|
||||
</td><td>
|
||||
<code>cvs</code>
|
||||
<input type="text" name="MOZ_CVS_FLAGS" value="$defaults{MOZ_CVS_FLAGS}"
|
||||
size="16">
|
||||
<code>co</code>
|
||||
<input type="text" name="MOZ_CO_FLAGS" value="$defaults{MOZ_CO_FLAGS}"
|
||||
size="16">
|
||||
</td></tr><tr><td>
|
||||
<input type="checkbox" name="pull_by_date">
|
||||
Pull by date
|
||||
</td><td>
|
||||
<input type='text' name='pull_date' value='$pull_date' size='25'>
|
||||
</td></tr></table>
|
||||
</td></tr>
|
||||
|
||||
@ -268,7 +295,7 @@ sub print_configure_form {
|
||||
<font face="Helvetica,Arial"><b>
|
||||
Object Directory:</b></font><br>
|
||||
</td></tr><tr><td><table><tr><td>
|
||||
<input type="radio" name="MOZ_OBJDIR" value="\@TOPSRCDIR\@" checked>
|
||||
<input type="radio" name="MOZ_OBJDIR" value="$defaults{MOZ_OBJDIR}" checked>
|
||||
<code>mozilla</code></td><td> Build in the source tree. (default)<br></td></tr><tr><td>
|
||||
<input type="radio" name="MOZ_OBJDIR" value="\@TOPSRCDIR\@/obj-\@CONFIG_GUESS\@">
|
||||
<code>mozilla/obj-`config.guess`</code> </td><td>(e.g. <code>mozilla/obj-i686-pc-linux-gnu)</code><br>
|
||||
|
Loading…
Reference in New Issue
Block a user