-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.do
34 lines (32 loc) · 893 Bytes
/
test.do
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# shellcheck shell=sh
# vi:et lbr noet sw=2 ts=2 tw=79 wrap
# Copyright 2022-2023 David Rabkin
redo-ifchange app/* lib/*
BSH="$(
CDPATH='' cd -- "$(dirname -- "$0" 2>&1)" 2>&1 && pwd -P 2>&1
)"/lib/base.sh || {
err=$?
printf >&2 %s\\n "$BSH"
exit $err
}
# shellcheck disable=SC2034 # Variable appears unused.
readonly \
BASE_APP_VERSION=0.9.20231230 \
BASE_MIN_VERSION=0.9.20231228 \
BSH
set -- "$@" --quiet
# shellcheck disable=SC1090 # File not following.
. "$BSH"
for sh in ash bash dash fish ksh oksh tcsh yash zsh; do
cmd_exists "$sh" || continue
chrono_sta run || die
for ok in app/*-ok; do
"$sh" -c "$ok 2>&1" || die "$ok" on "$sh" returns negative.
done
for no in app/*-no; do
# shellcheck disable=SC2015 # A && B || C.
"$sh" -c "$no 2>&1" && die "$no" on "$sh" returns positive. || :
done
dur="$(chrono_sto run)" || die
printf >&2 '%4s %s.\n' "$sh" "$dur"
done