Skip to content

Instantly share code, notes, and snippets.

@acodeninja
Created March 26, 2019 21:03
Show Gist options
  • Save acodeninja/f5243d0bab70ef83f473fe65981750e2 to your computer and use it in GitHub Desktop.
Save acodeninja/f5243d0bab70ef83f473fe65981750e2 to your computer and use it in GitHub Desktop.
Add any repositories from the local directory (recursively) to sourcerer cli app
#!/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