diff options
author | 2024-08-26 16:47:47 +0100 | |
---|---|---|
committer | 2024-08-26 19:22:42 +0200 | |
commit | 0ac74c9b715781cc3a86b1253686e46272bd178f (patch) | |
tree | a442e25046c53fef8d91f6f2a1ea4b5d43630269 | |
parent | Amendments to mirrors cron script for reliability (diff) |
Update script to use `cd -` instead of pushd/popd for sh compatibility
-rw-r--r-- | ansible/roles/git-mirrors/templates/update-mirrors.sh.j2 | 4 |
1 files changed, 1 insertions, 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 4d4579d..b662082 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 |