Created
March 26, 2019 21:03
-
-
Save acodeninja/f5243d0bab70ef83f473fe65981750e2 to your computer and use it in GitHub Desktop.
Add any repositories from the local directory (recursively) to sourcerer cli app
This file contains 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
#!/usr/bin/env bash | |
echo "Scanning, this might take a while, especially if you have lots of vendor directories" | |
while read d; do | |
echo "Adding directory $d to sourcerer" | |
sourcerer add $d | |
done < $(find . -type d \ | |
-exec sh -c 'cd "{}"; git rev-parse --git-dir 2> /dev/null 1>&2' \; \ | |
-prune \ | |
-print) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment