diff options
author | Mattias Andrée <maandree@kth.se> | 2016-03-24 11:15:20 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-03-24 11:15:20 +0100 |
commit | e3dacc61f29fd5774819b5c0461688c95a440cb4 (patch) | |
tree | ca2dc6b194e8c024b4acddfdcd8bc98c27eddae5 | |
parent | add more checksum tests (diff) | |
download | base-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>
-rwxr-xr-x | test-all | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -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) |