Print this page
11224 nightly and bldenv should be usable directly


   9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10 # or http://www.opensolaris.org/os/licensing.
  11 # See the License for the specific language governing permissions
  12 # and limitations under the License.
  13 #
  14 # When distributing Covered Code, include this CDDL HEADER in each
  15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16 # If applicable, add the following below this CDDL HEADER, with the
  17 # fields enclosed by brackets "[]" replaced with your own identifying
  18 # information: Portions Copyright [yyyy] [name of copyright owner]
  19 #
  20 # CDDL HEADER END
  21 #
  22 
  23 #
  24 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  25 # Copyright 2008, 2010, Richard Lowe
  26 # Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  27 # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org>
  28 # Copyright (c) 2017 by Delphix. All rights reserved.
  29 # Copyright 2019 Joyent, Inc.
  30 # Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
  31 # Copyright 2019 Peter Trible.
  32 #
  33 # Based on the nightly script from the integration folks,
  34 # Mostly modified and owned by mike_s.
  35 # Changes also by kjc, dmk.
  36 #
  37 # BRINGOVER_WS may be specified in the env file.
  38 # The default is the old behavior of CLONE_WS
  39 #
  40 # -i on the command line, means fast options, so when it's on the
  41 # command line (only), check builds are skipped no matter what
  42 # the setting of their individual flags are in NIGHTLY_OPTIONS.
  43 #
  44 # OPTHOME  may be set in the environment to override /opt
  45 #
  46 
  47 #
  48 # The CDPATH variable causes ksh's `cd' builtin to emit messages to stdout
  49 # under certain circumstances, which can really screw things up; unset it.


 649 #
 650 if [ -f /etc/nightly.conf ]; then
 651         . /etc/nightly.conf
 652 fi
 653 
 654 if [ -f $1 ]; then
 655         if [[ $1 = */* ]]; then
 656                 . $1
 657         else
 658                 . ./$1
 659         fi
 660 else
 661         if [ -f $OPTHOME/onbld/env/$1 ]; then
 662                 . $OPTHOME/onbld/env/$1
 663         else
 664                 echo "Cannot find env file as either $1 or $OPTHOME/onbld/env/$1"
 665                 exit 1
 666         fi
 667 fi
 668 
 669 # contents of stdenv.sh inserted after next line:
 670 # STDENV_START
 671 # STDENV_END
 672 
 673 # Check if we have sufficient data to continue...
 674 [[ -v CODEMGR_WS ]] || fatal_error "Error: Variable CODEMGR_WS not set."
 675 if  [[ "${NIGHTLY_OPTIONS}" == ~(F)n ]] ; then
 676         # Check if the gate data are valid if we don't do a "bringover" below
 677         [[ -d "${CODEMGR_WS}" ]] || \
 678                 fatal_error "Error: ${CODEMGR_WS} is not a directory."
 679         [[ -f "${CODEMGR_WS}/usr/src/Makefile" ]] || \
 680                 fatal_error "Error: ${CODEMGR_WS}/usr/src/Makefile not found."
 681 fi
 682 
 683 #
 684 # place ourselves in a new task, respecting BUILD_PROJECT if set.
 685 #
 686 if [ -z "$BUILD_PROJECT" ]; then
 687         /usr/bin/newtask -c $$
 688 else
 689         /usr/bin/newtask -c $$ -p $BUILD_PROJECT
 690 fi
 691 
 692 ps -o taskid= -p $$ | read build_taskid




   9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10 # or http://www.opensolaris.org/os/licensing.
  11 # See the License for the specific language governing permissions
  12 # and limitations under the License.
  13 #
  14 # When distributing Covered Code, include this CDDL HEADER in each
  15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16 # If applicable, add the following below this CDDL HEADER, with the
  17 # fields enclosed by brackets "[]" replaced with your own identifying
  18 # information: Portions Copyright [yyyy] [name of copyright owner]
  19 #
  20 # CDDL HEADER END
  21 #
  22 
  23 #
  24 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  25 # Copyright 2008, 2010, Richard Lowe
  26 # Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  27 # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org>
  28 # Copyright (c) 2017 by Delphix. All rights reserved.
  29 # Copyright 2020 Joyent, Inc.
  30 # Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
  31 # Copyright 2019 Peter Trible.
  32 #
  33 # Based on the nightly script from the integration folks,
  34 # Mostly modified and owned by mike_s.
  35 # Changes also by kjc, dmk.
  36 #
  37 # BRINGOVER_WS may be specified in the env file.
  38 # The default is the old behavior of CLONE_WS
  39 #
  40 # -i on the command line, means fast options, so when it's on the
  41 # command line (only), check builds are skipped no matter what
  42 # the setting of their individual flags are in NIGHTLY_OPTIONS.
  43 #
  44 # OPTHOME  may be set in the environment to override /opt
  45 #
  46 
  47 #
  48 # The CDPATH variable causes ksh's `cd' builtin to emit messages to stdout
  49 # under certain circumstances, which can really screw things up; unset it.


 649 #
 650 if [ -f /etc/nightly.conf ]; then
 651         . /etc/nightly.conf
 652 fi
 653 
 654 if [ -f $1 ]; then
 655         if [[ $1 = */* ]]; then
 656                 . $1
 657         else
 658                 . ./$1
 659         fi
 660 else
 661         if [ -f $OPTHOME/onbld/env/$1 ]; then
 662                 . $OPTHOME/onbld/env/$1
 663         else
 664                 echo "Cannot find env file as either $1 or $OPTHOME/onbld/env/$1"
 665                 exit 1
 666         fi
 667 fi
 668 




 669 # Check if we have sufficient data to continue...
 670 [[ -v CODEMGR_WS ]] || fatal_error "Error: Variable CODEMGR_WS not set."
 671 if  [[ "${NIGHTLY_OPTIONS}" == ~(F)n ]] ; then
 672         # Check if the gate data are valid if we don't do a "bringover" below
 673         [[ -d "${CODEMGR_WS}" ]] || \
 674                 fatal_error "Error: ${CODEMGR_WS} is not a directory."
 675         [[ -f "${CODEMGR_WS}/usr/src/Makefile" ]] || \
 676                 fatal_error "Error: ${CODEMGR_WS}/usr/src/Makefile not found."
 677 fi
 678 
 679 #
 680 # place ourselves in a new task, respecting BUILD_PROJECT if set.
 681 #
 682 if [ -z "$BUILD_PROJECT" ]; then
 683         /usr/bin/newtask -c $$
 684 else
 685         /usr/bin/newtask -c $$ -p $BUILD_PROJECT
 686 fi
 687 
 688 ps -o taskid= -p $$ | read build_taskid