From fde4911f41a07b05e6fbf08e20a177b5a420e800 Mon Sep 17 00:00:00 2001 From: tim Date: Thu, 30 May 2024 16:13:07 -0400 Subject: [PATCH] fix --- util/_utils.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 }