CONFIG: add date and paths information for tutorial Allrun script

STYLE: replace short-circuit Allrun script with Alltest
This commit is contained in:
Mark Olesen
2021-09-22 15:18:36 +02:00
parent 134aaee91a
commit fcd7423fa8
8 changed files with 109 additions and 86 deletions

View File

@ -75,6 +75,7 @@ cleanType=auto
if [ "$#" -gt 0 ]
then
unset caseDir
case "$1" in
(- | --)
shift
@ -102,31 +103,32 @@ then
;;
-case=*)
caseName="${1#*=}"
cd "$caseName" 2>/dev/null || {
echo "${0##*}: No such directory $caseName" 1>&2
exit 2
}
caseDir="${1#*=}"
;;
-case)
caseDir="$2"
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
shift
cd "$1" 2>/dev/null || {
echo "${0##*}: No such directory $1" 1>&2
exit 2
}
;;
-self* | -skipFirst)
skipSelf=true
;;
-*) die "unknown option: $1" ;;
*)
cd "$1" 2>/dev/null || {
echo "${0##*}: No such directory $1" 1>&2
exit 2
}
caseDir="$1"
;;
esac
shift
if [ -n "$caseDir" ]
then
cd "$caseDir" 2>/dev/null || {
echo "${0##*/}: No such directory $caseDir" 1>&2
exit 2
}
fi
fi