diff --git a/scripts/services b/scripts/services index a04e3160..d5412ed2 100755 --- a/scripts/services +++ b/scripts/services @@ -132,13 +132,11 @@ TMPFILE="$(mktemp)" log_debug "TMPFILE = $TMPFILE" for dir in ${CONFIG_POOL} ; do - #shellcheck disable=SC2106 - ( if ! [[ "${dir}" =~ ^/ ]] ; then log_error "${dir} is not an absolute path" continue fi - cd "${dir}" + pushd "${dir}" >/dev/null if [ ! -d .git ] ; then log_info "$dir has no support of .services" continue @@ -152,7 +150,7 @@ for dir in ${CONFIG_POOL} ; do unifyer "${SERVICES_POOL_BASE}/${dir}/$(dirname "$file")/ngcpcfg.services" fi done - ) + popd >/dev/null done if ! [ -s "$TMPFILE" ] ; then