commit 980b161540a9fb1b3691c610b5799ea1d3158a97 from: Thomas Adam date: Mon Jul 11 19:58:41 2022 UTC portable: regress: make OS-detection sh-compatible Don't rely on $OSTYPE being available, which it isn't in strict POSIX mode. Ubuntu's sh is often alised to dash, and hence this fails. Instead, default to using the output from 'uname'. commit - 8f000c9d285bf6e6880991a0eefe0c5db5084cbb commit + 980b161540a9fb1b3691c610b5799ea1d3158a97 blob - ef2b0f3c387cedf01c4142429355093055130d4a blob + 61693d0124d080967b08cd4aacf0859f70fc47ce --- regress/cmdline/common.sh +++ regress/cmdline/common.sh @@ -32,7 +32,7 @@ export MALLOC_OPTIONS=S # will be empty, but we still want to use it. Since we test for non-linux # values, only set PLATFORM if we're running on Linu so that the correct # commands are used. -[ -z "$PLATFORM" ] && [ "$OSTYPE" = "linux-gnu" ] && PLATFORM="linux" +[ -z "$PLATFORM" -a "$(uname)" = "Linux" ] && PLATFORM="linux" date() {