Skip to content

Commit

Permalink
do_{cmake,freebsd}: Don't invoke nproc(1) on FreeBSD
Browse files Browse the repository at this point in the history
Use sysctl(8) instead.  Also, there's no longer any need for /bin/bash
on FreeBSD.

Signed-off-by: Alan Somers <[email protected]>
  • Loading branch information
asomers committed Sep 25, 2017
1 parent 1006b62 commit 44c6a47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
3 changes: 2 additions & 1 deletion do_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 1 addition & 9 deletions do_freebsd.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 44c6a47

Please sign in to comment.