204 fi
205
206 if [[ -f "$1" ]]; then
207 if [[ "$1" == */* ]]; then
208 source "$1"
209 else
210 source "./$1"
211 fi
212 else
213 if [[ -f "/opt/onbld/env/$1" ]]; then
214 source "/opt/onbld/env/$1"
215 else
216 printf \
217 'Cannot find env file as either %s or /opt/onbld/env/%s\n' \
218 "$1" "$1"
219 exit 1
220 fi
221 fi
222 shift
223
224 # contents of stdenv.sh inserted after next line:
225 # STDENV_START
226 # STDENV_END
227
228 # Check if we have sufficient data to continue...
229 [[ -v CODEMGR_WS ]] || fatal_error "Error: Variable CODEMGR_WS not set."
230 [[ -d "${CODEMGR_WS}" ]] || fatal_error "Error: ${CODEMGR_WS} is not a directory."
231 [[ -f "${CODEMGR_WS}/usr/src/Makefile" ]] || fatal_error "Error: ${CODEMGR_WS}/usr/src/Makefile not found."
232
233 # must match the getopts in nightly.sh
234 OPTIND=1
235 NIGHTLY_OPTIONS="-${NIGHTLY_OPTIONS#-}"
236 while getopts '+0ABCDdFfGIilMmNnpRrtUuwW' FLAG $NIGHTLY_OPTIONS
237 do
238 case "$FLAG" in
239 t) flags.t=true ;;
240 +t) flags.t=false ;;
241 F) flags.DF_build=true ;;
242 *) ;;
243 esac
244 done
245
246 # DEBUG is a little bit complicated. First, bldenv -d/+d over-rides
247 # the env file. Otherwise, we'll default to DEBUG iff we are *not*
|
204 fi
205
206 if [[ -f "$1" ]]; then
207 if [[ "$1" == */* ]]; then
208 source "$1"
209 else
210 source "./$1"
211 fi
212 else
213 if [[ -f "/opt/onbld/env/$1" ]]; then
214 source "/opt/onbld/env/$1"
215 else
216 printf \
217 'Cannot find env file as either %s or /opt/onbld/env/%s\n' \
218 "$1" "$1"
219 exit 1
220 fi
221 fi
222 shift
223
224 # Check if we have sufficient data to continue...
225 [[ -v CODEMGR_WS ]] || fatal_error "Error: Variable CODEMGR_WS not set."
226 [[ -d "${CODEMGR_WS}" ]] || fatal_error "Error: ${CODEMGR_WS} is not a directory."
227 [[ -f "${CODEMGR_WS}/usr/src/Makefile" ]] || fatal_error "Error: ${CODEMGR_WS}/usr/src/Makefile not found."
228
229 # must match the getopts in nightly.sh
230 OPTIND=1
231 NIGHTLY_OPTIONS="-${NIGHTLY_OPTIONS#-}"
232 while getopts '+0ABCDdFfGIilMmNnpRrtUuwW' FLAG $NIGHTLY_OPTIONS
233 do
234 case "$FLAG" in
235 t) flags.t=true ;;
236 +t) flags.t=false ;;
237 F) flags.DF_build=true ;;
238 *) ;;
239 esac
240 done
241
242 # DEBUG is a little bit complicated. First, bldenv -d/+d over-rides
243 # the env file. Otherwise, we'll default to DEBUG iff we are *not*
|