Last active
January 30, 2025 21:11
-
-
Save pvdb/027b0dbe58b49b05d154604750b50c7d 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
#!/bin/sh | |
# | |
# INSTALLATION | |
# | |
# ln -s ${PWD}/git-recurse $(brew --prefix)/bin/ | |
# sudo ln -s ${PWD}/git-recurse /usr/local/bin/ | |
# | |
( | |
find . -mindepth 2 -maxdepth 2 -type d -name '.git' ; # ${REPO}/.git | |
find . -mindepth 3 -maxdepth 3 -type d -name '.git' ; # ${OWNER}/${REPO}/.git | |
find . -mindepth 4 -maxdepth 4 -type d -name '.git' ; # ${PACKAGE}/opt/${REPO}/.git | |
find . -mindepth 4 -maxdepth 4 -type d -name '.git' ; # ${PACKAGE}/start/${REPO}/.git | |
) | while read -r git_dir ; do | |
git_path=$(dirname "${git_dir}") ; | |
>&2 printf "\033[7m$ git -C %s %s\033[0m\n" "${git_path}" "$*" ; | |
git -C "${git_path}" "$@" ; | |
done | |
# That's all Folks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment