aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ansible/roles/git-mirrors/templates/update-mirrors.sh.j24
1 files changed, 2 insertions, 2 deletions
diff --git a/ansible/roles/git-mirrors/templates/update-mirrors.sh.j2 b/ansible/roles/git-mirrors/templates/update-mirrors.sh.j2
index 52831b6..7e3b847 100644
--- a/ansible/roles/git-mirrors/templates/update-mirrors.sh.j2
+++ b/ansible/roles/git-mirrors/templates/update-mirrors.sh.j2
@@ -3,7 +3,7 @@
set -u
# Base location of all mirrors
-MIRRORS_BASE_DIR="/srv/git-mirrors/mirrored"
+MIRRORS_BASE_DIR="{{ git_mirrors_base_dir }}/mirrored"
# Locate repositories knowing that there will be a HEAD file inside them
FOUND_REPOS=$(find "$MIRRORS_BASE_DIR" -name "HEAD" | xargs dirname)
@@ -11,7 +11,7 @@ FOUND_REPOS=$(find "$MIRRORS_BASE_DIR" -name "HEAD" | xargs dirname)
for repo in $FOUND_REPOS; do
cd "$repo";
echo "Updating $repo mirror..."
- if ! git fetch -q; then
+ if ! git fetch -q --prune; then
echo "Error: Failed to update repository $repo"
exit 1
fi