summaryrefslogtreecommitdiff
path: root/runoff
diff options
context:
space:
mode:
authorAustin Clements <[email protected]>2010-09-02 03:57:20 -0400
committerAustin Clements <[email protected]>2010-09-02 03:57:20 -0400
commit9d7a63e0734b4c7abe5ae00eda302e7d7a22a482 (patch)
tree5464f751f72970710fa19158392422f67542b726 /runoff
parent0fa1ab632f6e328321cdec779e66ed07cac89d04 (diff)
downloadxv6-labs-9d7a63e0734b4c7abe5ae00eda302e7d7a22a482.tar.gz
xv6-labs-9d7a63e0734b4c7abe5ae00eda302e7d7a22a482.tar.bz2
xv6-labs-9d7a63e0734b4c7abe5ae00eda302e7d7a22a482.zip
Specify in runoff.spec which side sheet 1 is on, since it keeps changing
Diffstat (limited to 'runoff')
-rwxr-xr-xrunoff17
1 files changed, 9 insertions, 8 deletions
diff --git a/runoff b/runoff
index 1435646..3dee1cc 100755
--- a/runoff
+++ b/runoff
@@ -58,6 +58,13 @@ perl -e '
next;
}
+ if(/sheet1: (left|right)$/){
+ print STDERR "assuming that sheet 1 is a $1 page. double-check!\n";
+ $left = $1 eq "left" ? "13579" : "02468";
+ $right = $1 eq "left" ? "02468" : "13579";
+ next;
+ }
+
if(/even: (.*)/){
$file = $1;
if(!defined($toc{$file})){
@@ -90,17 +97,11 @@ perl -e '
print STDERR "Have no toc for $file\n";
next;
}
- # this assumes that sheet 1 of code is a right page
- # double-check the PDF. swap the two regexps below
- # otherwise.
- if(!$leftwarn++) {
- print STDERR "assuming that sheet 1 is a right page. double-check!\n";
- }
- if($what eq "left" && !($toc{$file} =~ /^\d[02468]$tens/)){
+ if($what eq "left" && !($toc{$file} =~ /^\d[$left]$tens/)){
print STDERR "$file does not start on a fresh left page [$toc{$file}]\n";
}
# why does this not work if I inline $x in the if?
- $x = ($toc{$file} =~ /^\d[13579]$tens/);
+ $x = ($toc{$file} =~ /^\d[$right]$tens/);
if($what eq "right" && !$x){
print STDERR "$file does not start on a fresh right page [$toc{$file}] [$x]\n";
}