aboutsummaryrefslogtreecommitdiff
path: root/etc/bootstrap/bbot-bootstrap-linux.sh
blob: 71a1dda6421bc7fc8b3f3c9f28334a83ef629d5d (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
#!/bin/sh

# file      : etc/bootstrap/bbot-bootstrap-linux.sh
# license   : TBC; see accompanying LICENSE file

if ! jobs="$(nproc)"; then
  jobs=1
fi

# Enable core dumps (into /tmp by default) for postmortem debugging.
#
cd /tmp
ulimit -c unlimited

# Note: bootstrap script options must come before build.sh options/arguments
#
"$(dirname "$0")/bbot-bootstrap.sh" --make make --jobs "$jobs" "$@"

# If success, wait a bit and shutdown. Otherwise leave the machine running
# for investigation.
#
if test "$?" -eq 0; then
  sleep 5
  sudo shutdown -h now
fi