diff options
author | heqnx <root@heqnx.com> | 2025-05-27 21:19:00 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-05-27 21:19:00 +0300 |
commit | 7bc1627859461cddbedd9317bd729356f001b868 (patch) | |
tree | 2e5090c63f5bdf9d22405004f062ee9d95893d56 | |
parent | 590afad8001ab4a4f2f1be2202da5c2dc8bcd3e2 (diff) | |
download | gists-7bc1627859461cddbedd9317bd729356f001b868.tar.gz gists-7bc1627859461cddbedd9317bd729356f001b868.zip |
added cloner script
-rw-r--r-- | clone-all-cgit-repos.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clone-all-cgit-repos.sh b/clone-all-cgit-repos.sh new file mode 100644 index 0000000..1fdf658 --- /dev/null +++ b/clone-all-cgit-repos.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +cgit="https://cgit.heqnx.com" + +repos=$(curl -sSL "${cgit}" | grep -o "<a href='/[^']*/'>" | sed -E "s/^<a href='([^']*)'>/\1/" | sort -u) + +mkdir repos &>/dev/null +while IFS= read -r i; do + printf "%s\n" "[inf] ${cgit}${i}" + git -C repos clone "${cgit}${i}" +done <<< "${repos}" |