From e3dacc61f29fd5774819b5c0461688c95a440cb4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 24 Mar 2016 11:15:20 +0100 Subject: add EPATH variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- test-all | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'test-all') 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) -- cgit v1.2.3-70-g09d2