######################################################################## # # # This file is part of the ksh 93u+m package # # Copyright (c) 1982-2012 AT&T Intellectual Property # # Copyright (c) 2021 Contributors to ksh 93u+m # # # # and is licensed under the # # Eclipse Public License, Version 1.0 # # # # A copy of the License is available at # # http://www.eclipse.org/org/documents/epl-v10.html # # (with md5 checksum b35adb5213ca9657e911e9befb180842) # # # # Martijn Dekker # # # ######################################################################## _message() { print -r $'\t'"${Command}[$1]: ${@:2}" >&2 } alias err_exit='_message "$((Errors++,LINENO))"' # inaccurate err_exit name kept for historical integrity :) alias warning='_message "$LINENO" "warning:"' Command=${0##*/} integer Errors=0 if ! [[ -d $tmp && -w $tmp && $tmp == "$PWD" ]] then print -r "$Command: \$tmp not set; run this from shtests. Aborting." >&2 exit 1 fi