Created
November 17, 2023 14:47
-
-
Save coderxin/25c0920384e0fb1feae3135f4b2d9a84 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Utility to clone all non-achived Git repos from Organisation | |
# - Clone only if target folder does not exist | |
gh repo list CHANGE_ORG_NAME --no-archived --limit 1000 | while read -r repo _; do | |
DIRECTORY=$(echo "$repo" | cut -d "/" -f 2) | |
if [ ! -d "$DIRECTORY" ]; then | |
echo "$DIRECTORY does not exist." | |
gh repo clone "$repo" "$DIRECTORY" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment