diff --git a/scripts/03_update_module.sh b/scripts/03_update_module.sh index ca9dc8c..67d3cfb 100755 --- a/scripts/03_update_module.sh +++ b/scripts/03_update_module.sh @@ -4,7 +4,7 @@ set -xueo pipefail source "$(dirname $0)/utils.sh" goto_root -root=$(basename $(pwd)) +root=$(basename ${PWD}) # loop over every monitors set for path in $(find "$(get_scope $1)" -path ./incubator -prune -o -name 'monitors-*.tf' -print | sort -fdbi); do @@ -14,7 +14,7 @@ for path in $(find "$(get_scope $1)" -path ./incubator -prune -o -name 'monitors # if modules.tf does not exist AND if this set respect our tagging convention if ! [ -f modules.tf ] && grep -q filter_tags_use_defaults inputs.tf; then relative="" - current="$(pwd)" + current="${PWD}" while [[ "$(basename $current)" != "$root" ]]; do relative="${relative}../" current="$(dirname $current)"