summaryrefslogtreecommitdiffhomepage
path: root/services/repos/scripts/fetch-repos.sh
diff options
context:
space:
mode:
Diffstat (limited to 'services/repos/scripts/fetch-repos.sh')
-rwxr-xr-xservices/repos/scripts/fetch-repos.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/services/repos/scripts/fetch-repos.sh b/services/repos/scripts/fetch-repos.sh
new file mode 100755
index 00000000..e8e9d4ea
--- /dev/null
+++ b/services/repos/scripts/fetch-repos.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+for repo_path in repos/*; do
+ if [[ -d "$repo_path" ]]; then
+ repo_name=$(basename "$repo_path" .git)
+ echo "Fetching $repo_name"
+ git -C "$repo_path" fetch --tags --prune origin
+ sleep 5
+ fi
+done