Skip to content

Instantly share code, notes, and snippets.

@claunia
Last active March 2, 2025 15:41
Show Gist options
  • Save claunia/d4f3ba4a33de7f08a0d322b2d5f44199 to your computer and use it in GitHub Desktop.
Save claunia/d4f3ba4a33de7f08a0d322b2d5f44199 to your computer and use it in GitHub Desktop.
Clone (from a hidden list) and update (from existing) a tree of git mirrors
#!/bin/bash
GIT_TERMINAL_PROMPT=0 find . -type f -iname .list.txt | parallel 'a={}; cd ${a%.list.txt}; parallel --results "`pwd`/results/" --color-failed --env GIT_TERMINAL_PROMPT --timeout 300 git clone --recursive < .list.txt'
GIT_TERMINAL_PROMPT=0 find . -type d -iname .git | parallel --results "`pwd`/results/" --color-failed --env GIT_TERMINAL_PROMPT --timeout 300 'cd {}/..; git pull --recurse-submodules'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment