projects
/
gruntmaster-page.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f8cf80
)
Add contest support to gensrc
author
Marius Gavrilescu
<marius@ieval.ro>
Thu, 30 Jan 2014 16:26:43 +0000
(18:26 +0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Thu, 30 Jan 2014 16:26:43 +0000
(18:26 +0200)
lib/Gruntmaster/Page.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Gruntmaster/Page.pm
b/lib/Gruntmaster/Page.pm
index 6b081a2702df83ce88043646ba7a9556d254b14e..e57b0402495cb9e13306bea0448a798c8458ecf1 100644
(file)
--- a/
lib/Gruntmaster/Page.pm
+++ b/
lib/Gruntmaster/Page.pm
@@
-90,10
+90,13
@@
sub generate{
}
sub gensrc{
- my ($job) = @_;
+ my ($contest, $job) = split /\./, $_[0];
+ local $Gruntmaster::Data::contest = $contest if $contest;
my $ext = job_extension $job;
- make_path "log/src/";
- write_file "log/src/$job.$ext", job_inmeta($job)->{files}{prog}{content};
+ my $log = $contest ? "ct/$contest/log" : 'log';
+ make_path "$log/src/";
+ say STDERR "Writing to $log/src/$job.$ext";
+ write_file "$log/src/$job.$ext", job_inmeta($job)->{files}{prog}{content};
}
1;
This page took
0.010866 seconds
and
4
git commands to generate.