Print this page
11224 nightly and bldenv should be usable directly

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/bldenv.sh
          +++ new/usr/src/tools/scripts/bldenv
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17  # fields enclosed by brackets "[]" replaced with your own identifying
  18   18  # information: Portions Copyright [yyyy] [name of copyright owner]
  19   19  #
  20   20  # CDDL HEADER END
  21   21  #
  22   22  
  23   23  #
  24   24  # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  25   25  # Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  26   26  # Copyright 2014 Garrett D'Amore <garrett@damore.org>
  27      -# Copyright 2018 Joyent, Inc.
       27 +# Copyright 2020 Joyent, Inc.
  28   28  #
  29   29  # Uses supplied "env" file, based on /opt/onbld/etc/env, to set shell variables
  30   30  # before spawning a shell for doing a release-style builds interactively
  31   31  # and incrementally.
  32   32  #
  33   33  
  34   34  function fatal_error
  35   35  {
  36   36          print -u2 "${progname}: $*"
  37   37          exit 1
↓ open down ↓ 176 lines elided ↑ open up ↑
 214  214                  source "/opt/onbld/env/$1"
 215  215          else
 216  216                  printf \
 217  217                      'Cannot find env file as either %s or /opt/onbld/env/%s\n' \
 218  218                      "$1" "$1"
 219  219                  exit 1
 220  220          fi
 221  221  fi
 222  222  shift
 223  223  
 224      -# contents of stdenv.sh inserted after next line:
 225      -# STDENV_START
 226      -# STDENV_END
 227      -
 228  224  # Check if we have sufficient data to continue...
 229  225  [[ -v CODEMGR_WS ]] || fatal_error "Error: Variable CODEMGR_WS not set."
 230  226  [[ -d "${CODEMGR_WS}" ]] || fatal_error "Error: ${CODEMGR_WS} is not a directory."
 231  227  [[ -f "${CODEMGR_WS}/usr/src/Makefile" ]] || fatal_error "Error: ${CODEMGR_WS}/usr/src/Makefile not found."
 232  228  
 233      -# must match the getopts in nightly.sh
      229 +# must match the getopts in nightly
 234  230  OPTIND=1
 235  231  NIGHTLY_OPTIONS="-${NIGHTLY_OPTIONS#-}"
 236  232  while getopts '+0ABCDdFfGIilMmNnpRrtUuwW' FLAG $NIGHTLY_OPTIONS
 237  233  do
 238  234          case "$FLAG" in
 239  235            t)    flags.t=true  ;;
 240  236            +t)   flags.t=false ;;
 241  237            F)    flags.DF_build=true ;;
 242  238            *)    ;;
 243  239          esac
↓ open down ↓ 182 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX