diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-06-06 22:54:21 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-06-06 22:54:21 +0200 |
commit | ca1f05897fb22ccdf94e5978f2fab7a96dca978c (patch) | |
tree | aa465d0eecad6359d00162fc0f353bc676d94224 /bin | |
parent | 5a4b26958471fc30137f840627c774703b8afd43 (diff) | |
download | jenkins.debian.net-ca1f05897fb22ccdf94e5978f2fab7a96dca978c.tar.xz |
make grep more robust
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/d-i_build.sh | 2 | ||||
-rwxr-xr-x | bin/d-i_manual.sh | 2 | ||||
-rwxr-xr-x | bin/reproducible_build.sh | 2 | ||||
-rwxr-xr-x | bin/reproducible_common.sh | 2 | ||||
-rwxr-xr-x | bin/reproducible_coreboot.sh | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/bin/d-i_build.sh b/bin/d-i_build.sh index a6359c09..2e189d1f 100755 --- a/bin/d-i_build.sh +++ b/bin/d-i_build.sh @@ -67,7 +67,7 @@ pdebuild_package() { SOURCE=$(dpkg-parsechangelog |grep ^Source: | cut -d " " -f2) # workaround #767260 (console-setup doesn't support parallel build) if [ "$SOURCE" != "console-setup" ] ; then - NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l) + NUM_CPU=$(cat /proc/cpuinfo |grep '^processor'|wc -l) else NUM_CPU=1 fi diff --git a/bin/d-i_manual.sh b/bin/d-i_manual.sh index 3e9d2beb..01a9f14b 100755 --- a/bin/d-i_manual.sh +++ b/bin/d-i_manual.sh @@ -46,7 +46,7 @@ pdebuild_package() { # build # cd manual - NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l) + NUM_CPU=$(cat /proc/cpuinfo |grep '^processor'|wc -l) pdebuild --use-pdebuild-internal --debbuildopts "-j$NUM_CPU" -- --http-proxy $http_proxy # # publish and cleanup diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 72b91c46..c3473032 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -401,7 +401,7 @@ check_suitability() { build_rebuild() { FTBFS=1 local TMPCFG=$(mktemp -t pbuilderrc_XXXX --tmpdir=$TMPDIR) - local NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l) + local NUM_CPU=$(cat /proc/cpuinfo |grep '^processor'|wc -l) mkdir b1 b2 set -x printf "BUILDUSERID=1111\nBUILDUSERNAME=pbuilder1\n" > $TMPCFG diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index d9a9ea12..7e89a028 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -263,7 +263,7 @@ write_explaination_table() { write_page "<tr><td>env TZ</td><td>TZ=\"/usr/share/zoneinfo/Etc/GMT+12\"</td><td>TZ=\"/usr/share/zoneinfo/Etc/GMT-14\"</td></tr>" write_page "<tr><td>env LANG</td><td>LANG=\"en_GB.UTF-8\"</td><td>LANG=\"fr_CH.UTF-8\"</td></tr>" write_page "<tr><td>env LC_ALL</td><td><em>unset</em></td><td>LC_ALL=\"fr_CH.UTF-8\"</td></tr>" - local NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l) + local NUM_CPU=$(cat /proc/cpuinfo |grep '^processor'|wc -l) if [ "$1" = "debian" ] ; then write_page "<tr><td>env PATH</td><td>PATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:\"</td><td>PATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path\"</td></tr>" write_page "<tr><td>env BUILDUSERID</td><td>BUILDUSERID=\"1111\"</td><td>BUILDUSERID=\"2222\"</td></tr>" diff --git a/bin/reproducible_coreboot.sh b/bin/reproducible_coreboot.sh index 9848ffe6..43d7ecaa 100755 --- a/bin/reproducible_coreboot.sh +++ b/bin/reproducible_coreboot.sh @@ -111,7 +111,7 @@ export TZ="/usr/share/zoneinfo/Etc/GMT+12" # prevent failing using more than one CPU sed -i 's#MAKE=$i#MAKE=make#' util/abuild/abuild # use all cores for first build -NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l) +NUM_CPU=$(cat /proc/cpuinfo |grep '^processor'|wc -l) sed -i "s#cpus=1#cpus=$NUM_CPU#" util/abuild/abuild sed -i 's#USE_XARGS=1#USE_XARGS=0#g' util/abuild/abuild # actually build everything |