diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-11-02 11:44:36 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-11-02 11:44:36 +0900 |
| commit | f47a2ded50f3367d0c7b0673a6c452a93c1a669f (patch) | |
| tree | 81d5189dd550b7f4f4fe9227029cb87c9a96f7a6 /services/repos/scripts/clone-repos.sh | |
| parent | 960fb725eff960720268aa1425ac8880377d638f (diff) | |
| download | nsfisis.dev-f47a2ded50f3367d0c7b0673a6c452a93c1a669f.tar.gz nsfisis.dev-f47a2ded50f3367d0c7b0673a6c452a93c1a669f.tar.zst nsfisis.dev-f47a2ded50f3367d0c7b0673a6c452a93c1a669f.zip | |
Diffstat (limited to 'services/repos/scripts/clone-repos.sh')
| -rwxr-xr-x | services/repos/scripts/clone-repos.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/services/repos/scripts/clone-repos.sh b/services/repos/scripts/clone-repos.sh new file mode 100755 index 00000000..e4ea7ffc --- /dev/null +++ b/services/repos/scripts/clone-repos.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -euo pipefail + +for url in $(grep '^repo\.homepage=' repos.cgitrc | sed 's/^repo\.homepage=//'); do + repo_name=$(basename "$url" .git) + repo_path="repos/${repo_name}.git" + + if [[ -d "$repo_path" ]]; then + echo "Skipping $repo_name" + else + echo "Cloning $repo_name from $url" + git clone --bare "$url" "$repo_path" + sleep 5 + fi +done |
