]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
do_{cmake,freebsd}: Don't invoke nproc(1) on FreeBSD 17949/head
authorAlan Somers <asomers@gmail.com>
Mon, 25 Sep 2017 21:01:49 +0000 (15:01 -0600)
committerAlan Somers <asomers@gmail.com>
Mon, 25 Sep 2017 22:24:06 +0000 (16:24 -0600)
Use sysctl(8) instead.  Also, there's no longer any need for /bin/bash
on FreeBSD.

Signed-off-by: Alan Somers <asomers@gmail.com>
do_cmake.sh
do_freebsd.sh

index 739da8e5b0ce322426f9e1bac9389bb074f16187..b8e092d1332cfbdc6d581b91838d306b937d8fbb 100755 (executable)
@@ -13,7 +13,8 @@ fi
 
 mkdir build
 cd build
-cmake -DBOOST_J=$(nproc) $ARGS "$@" ..
+NPROC=${NPROC:-$(nproc)}
+cmake -DBOOST_J=$NPROC $ARGS "$@" ..
 
 # minimal config to find plugins
 cat <<EOF > ceph.conf
index bf9007488f06e31aecf6c44ca7bd3dcc28a4f6f3..2cfa8fa6a7c7dd13839cee93e0f7c0eae36e4283 100755 (executable)
@@ -1,14 +1,6 @@
 #!/bin/sh -xve
-NPROC=`sysctl -n hw.ncpu`
+export NPROC=`sysctl -n hw.ncpu`
 
-# we need bash first otherwise almost nothing will work
-if [ ! -L /bin/bash ]; then
-    echo install bash and link /bin/bash to /usr/local/bin/bash
-    echo Run:
-    echo     sudo pkg install bash
-    echo     ln -s /usr/local/bin/bash /bin/bash
-    exit 1
-fi
 if [ x"$1"x = x"--deps"x ]; then
     sudo ./install-deps.sh
 fi