diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-17 22:42:56 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-17 22:42:56 -0700 |
commit | caddc46054b720bd88757b0c15de1d305216fa77 (patch) | |
tree | 16b614eeeb6d672c7e72648b3884e5eeeee62e22 /t/test-lib.sh | |
parent | b32e9240ec68f2493038c5cfbc9ca6859cca6ad8 (diff) | |
download | rainbows-caddc46054b720bd88757b0c15de1d305216fa77.tar.gz |
At least these tests all run with dash now, but ksh93 or bash is still recommended for pipefail
Diffstat (limited to 't/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index 29b57f7..5b9a90a 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1,7 +1,18 @@ #!/bin/sh # Copyright (c) 2009 Rainbows! developers -set -o pipefail >/dev/null 2>&1 || : # non-POSIX, but useful in ksh/bash +# pipefail is non-POSIX, but useful in ksh/bash +( + set +e + set -o pipefail +) +if test $? -eq 0 +then + set -o pipefail +else + echo >&2 "WARNING: your shell does not understand pipefail" +fi + set -e set -u T=$(basename $0) |