From 999f301d3aebf747599ede0ee07a0de49929f4cf Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Wed, 26 Sep 2018 11:35:18 +0200 Subject: [PATCH] MON-311 add comments --- scripts/03_update_module.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/03_update_module.sh b/scripts/03_update_module.sh index 67d3cfb..4458c20 100755 --- a/scripts/03_update_module.sh +++ b/scripts/03_update_module.sh @@ -15,8 +15,11 @@ for path in $(find "$(get_scope $1)" -path ./incubator -prune -o -name 'monitors if ! [ -f modules.tf ] && grep -q filter_tags_use_defaults inputs.tf; then relative="" current="${PWD}" + # iterate on path until we go back to root while [[ "$(basename $current)" != "$root" ]]; do + # for each iteration add "../" to generate relative path relative="${relative}../" + # remove last directory from current path current="$(dirname $current)" done # add the filter tags module