diff options
-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}" |