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
diff --git a/booker.pl b/booker.pl
index 7d81ece..c2abae6 100644
--- a/booker.pl
+++ b/booker.pl
@@ -28,13 +28,13 @@ while (<IN>) {
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