build.sh (850B)
1 #!/usr/bin/env bash 2 3 . $(dirname "$0")/tools.sh 4 5 set -e 6 7 # builds write to the source dir (and its parent), so move the source trees to 8 # our workspace from the (cached) checkout dir 9 cp -a "${VCS_PATH}/nss" "${VCS_PATH}/nspr" . 10 11 if [ -n "$NSS_BUILD_MODULAR" ]; then 12 ln -sf /builds/worker/artifacts artifacts 13 $(dirname "$0")/build_nspr.sh || exit $? 14 $(dirname "$0")/build_util.sh || exit $? 15 $(dirname "$0")/build_softoken.sh || exit $? 16 $(dirname "$0")/build_nss.sh || exit $? 17 exit 18 fi 19 20 pushd nspr 21 hg revert --all 22 if [[ -f ../nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then 23 patch -p1 < ../nss/nspr.patch 24 fi 25 popd 26 27 # Build. 28 make -C nss nss_build_all 29 30 # Package. 31 if [ `uname` = Linux ]; then 32 artifacts=/builds/worker/artifacts 33 else 34 mkdir artifacts 35 artifacts=artifacts 36 fi 37 tar cvfjh ${artifacts}/dist.tar.bz2 dist