From a0187dbf6494bbc67829b6256b43fd1920396595 Mon Sep 17 00:00:00 2001 From: nazunalika Date: Wed, 10 Nov 2021 16:57:42 -0700 Subject: [PATCH] try pushd --- sync/minor-release-sync-to-staging.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sync/minor-release-sync-to-staging.sh b/sync/minor-release-sync-to-staging.sh index 410125d..a8bfb5f 100644 --- a/sync/minor-release-sync-to-staging.sh +++ b/sync/minor-release-sync-to-staging.sh @@ -11,7 +11,7 @@ MAJ=${RLVER} # sync all pieces of a release, including extras, nfv, etc for COMPOSE in "${NONSIG_COMPOSE[@]}"; do echo "${COMPOSE}: Syncing" - cd "/mnt/compose/${MAJ}/latest-${COMPOSE}-${MAJ}/compose" || { echo "${COMPOSE}: Failed to change directory"; break; } + pushd "/mnt/compose/${MAJ}/latest-${COMPOSE}-${MAJ}/compose" || { echo "${COMPOSE}: Failed to change directory"; break; } TARGET="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" mkdir -p "${TARGET}" @@ -22,7 +22,7 @@ for COMPOSE in "${NONSIG_COMPOSE[@]}"; do {} "${TARGET}" # Return back to where we started - cd "$(dirname "$0")" || { echo "${COMPOSE}: Failed to change back"; break; } + popd "$(dirname "$0")" || { echo "${COMPOSE}: Failed to change back"; break; } done