From ed8e8fdb0ad245f5a9de1a678d23109f72ba31c6 Mon Sep 17 00:00:00 2001 From: Dennis Fateyev Date: Sat, 12 Dec 2015 18:12:42 +0100 Subject: [PATCH] Small fixes testme.sh: nowadays some VM solutions tend to use "processor" word in other places (like "model name: Common KVM processor") booker.pl: escape left brace --- booker.pl | 6 +++--- testme.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/booker.pl b/booker.pl index 7d81ece..c2abae6 100644 --- a/booker.pl +++ b/booker.pl @@ -28,13 +28,13 @@ while () { if (!(++$x % 80)) { print "\n"; } #update the headings if (~($_ =~ /\*/)) { - if ($_ =~ /\\chapter{.+}/) { + if ($_ =~ /\\chapter\{.+}/) { ++$chapter; $section = $subsection = 0; - } elsif ($_ =~ /\\section{.+}/) { + } elsif ($_ =~ /\\section\{.+}/) { ++$section; $subsection = 0; - } elsif ($_ =~ /\\subsection{.+}/) { + } elsif ($_ =~ /\\subsection\{.+}/) { ++$subsection; } } diff --git a/testme.sh b/testme.sh index 15cf32c..6324525 100755 --- a/testme.sh +++ b/testme.sh @@ -9,7 +9,7 @@ set -e if [ -f /proc/cpuinfo ] then - MAKE_JOBS=$(( ($(cat /proc/cpuinfo | grep processor | tail -n -1 | cut -d':' -f2) + 1) * 2 + 1 )) + MAKE_JOBS=$(( ($(cat /proc/cpuinfo | grep -E '^processor[[:space:]]*:' | tail -n -1 | cut -d':' -f2) + 1) * 2 + 1 )) else MAKE_JOBS=8 fi