-
Notifications
You must be signed in to change notification settings - Fork 245
/
build_illumos
executable file
·40 lines (31 loc) · 1004 Bytes
/
build_illumos
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
36
37
38
39
40
#!/usr/bin/env bash
#
# Copyright (c) 2013 Joyent Inc.
#
# Setup for building stuff!
unset CC
unset CXX
ROOT=`pwd`
export PATH=/opt/onbld/bin:/sbin:/usr/sbin:/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin:/opt/local/bin
if [[ -z $BUILDSTAMP ]]; then
BUILDSTAMP=`TZ=UTC date "+%Y%m%dT%H%M%SZ"`; export BUILDSTAMP
fi
mkdir -p ${ROOT}/proto
echo ${BUILDSTAMP} > ${ROOT}/proto/buildstamp
echo "==> Building Illumos (${BUILDSTAMP})"
set -o pipefail
set -e
cd ${ROOT}/projects/illumos
[[ -d "log" ]] || mkdir -p log
cp usr/src/tools/scripts/nightly.sh ./nightly
chmod u+x ./nightly
gsed -i -e "s|^GATE=.*$|GATE=\"joyent_${BUILDSTAMP}\"; export GATE|" illumos.sh
ksh93 ./usr/src/tools/scripts/bldenv.sh illumos.sh \
'cd $CODEMGR_WS/usr/src && export PATH="$PATH:/opt/local/bin" && \
dmake setup && cd tools && dmake install'
printf "\nRunning illumos nightly(1).\n"
printf "This will take a while.\n"
time ./nightly illumos.sh
res=$?
# Post-build joyent specific changes to the proto area
exit $res