From c792c4182c3c17280a418ca5f97d36fac112f0a2 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Mon, 26 Aug 2024 16:47:47 +0100 Subject: [PATCH] Update script to use `cd -` instead of pushd/popd for sh compatibility --- ansible/roles/git-mirrors/templates/update-mirrors.sh.j2 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ansible/roles/git-mirrors/templates/update-mirrors.sh.j2 b/ansible/roles/git-mirrors/templates/update-mirrors.sh.j2 index 4d4579dd..b6620824 100644 --- a/ansible/roles/git-mirrors/templates/update-mirrors.sh.j2 +++ b/ansible/roles/git-mirrors/templates/update-mirrors.sh.j2 @@ -9,8 +9,6 @@ MIRRORS_BASE_DIR="{{ git_mirrors_base_dir }}/mirrored" FOUND_REPOS=$(find "$MIRRORS_BASE_DIR" -name "HEAD" -print0 | xargs -0 dirname) for repo in $FOUND_REPOS; do - pushd - cd "$repo"; echo "Updating $repo mirror..." if ! git fetch -q --prune; then @@ -19,5 +17,5 @@ for repo in $FOUND_REPOS; do fi echo "Updated repository." - popd + cd - done