diff --git a/util/_utils.sh b/util/_utils.sh index 8bd3e5da85..eb9a1d3c26 100755 --- a/util/_utils.sh +++ b/util/_utils.sh @@ -24,9 +24,13 @@ function _assert() { # reverse-susbstitute well known paths for use as tidier debug logging function _relativize() { test ! -v DEBUG || { echo "$@" ; return 0; } - local rel="$@" - for x in build_dir source_dir root_dir gha_fsvr_dir fsvr_dir fsvr_cache_dir nunja_dir p373r_dir openvr_dir ; do - test ! -v $x || rel=${rel//${!x}/\{${x}\}} + local rel="$@" x= + for x in build_dir source_dir root_dir ghash gha_fsvr_dir fsvr_dir fsvr_cache_dir nunja_dir p373r_dir openvr_dir ; do + test ! -v $x || { + local y="$( echo "${!x}" | tr \\ / )" + rel=${rel//${!x}/\{${x}\}} + rel=${rel//${y}/\{${x}\}} + } done echo $rel }