blob: 0b1d38d4464f5e977afc226882c3f5a78a0d2575 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/bin/sh
# file : etc/bootstrap/bbot-bootstrap-freebsd.sh
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license : TBC; see accompanying LICENSE file
# Note: install GNU make with 'pkg install gmake'.
#
if ! jobs="$(sysctl -n hw.ncpu)"; then
jobs=1
fi
# Enable core dumps (into /tmp by default) for postmortem debugging. These
# are normally enabled by default but check also:
#
# sysctl -a | grep kern.coredump
#
cd /tmp
ulimit -c unlimited
# Note: bootstrap script options must come before build options.
#
"$(dirname "$0")/bbot-bootstrap.sh" \
"$@" \
--make gmake \
--make "-j$jobs"
# If success, wait a bit and shutdown. Otherwise leave the machine running
# for investigation.
#
if test "$?" -eq 0; then
sleep 5
sudo shutdown -p now
fi
|