Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
humbletim committed May 30, 2024
1 parent d9bf684 commit fde4911
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions util/_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit fde4911

Please sign in to comment.