aboutsummaryrefslogtreecommitdiffstats
path: root/test-all
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-03-24 11:15:20 +0100
committerMattias Andrée <maandree@kth.se>2016-03-24 11:15:20 +0100
commite3dacc61f29fd5774819b5c0461688c95a440cb4 (patch)
treeca2dc6b194e8c024b4acddfdcd8bc98c27eddae5 /test-all
parentadd more checksum tests (diff)
downloadbase-util-tests-e3dacc61f29fd5774819b5c0461688c95a440cb4.tar.gz
base-util-tests-e3dacc61f29fd5774819b5c0461688c95a440cb4.tar.bz2
base-util-tests-e3dacc61f29fd5774819b5c0461688c95a440cb4.tar.xz
add EPATH variable
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'test-all')
-rwxr-xr-xtest-all14
1 files changed, 9 insertions, 5 deletions
diff --git a/test-all b/test-all
index 6ba7505..e233bcf 100755
--- a/test-all
+++ b/test-all
@@ -9,15 +9,19 @@ function all()
shake256sum shake512sum cksum true false echo
}
-if test -n "${IN_PATH}"; then
- exec 99>&2
- exec 2>/dev/null
+exec 99>&2
+exec 2>/dev/null
+if test -n "${EPATH}"; then
+ for c in $(all); do
+ eval "export $(echo $c | tr '[a-z-]' '[A-Z_]')='$(realpath "$(env PATH="${EPATH}" "$(which which)" $c)")'"
+ done
+elif test -n "${IN_PATH}"; then
for c in $(all); do
eval "export $(echo $c | tr '[a-z-]' '[A-Z_]')='$(realpath "$(which $c)")'"
done
- exec 2>&99
- exec 99>&-
fi
+exec 2>&99
+exec 99>&-
if test $# = 0; then
set $(all)