Skip to content

Instantly share code, notes, and snippets.

@imtapps
Created January 15, 2014 19:55
Show Gist options
  • Save imtapps/8443308 to your computer and use it in GitHub Desktop.
Save imtapps/8443308 to your computer and use it in GitHub Desktop.
Build Tree of dependencies between projects
#!/bin/bash
DONE=()
WORKING=`pwd`
findit() {
cd $WORKING
DONE+=($1)
echo ""
echo "=========="
echo "$1"
echo "=========="
for RESULT in `find . -name requirements | xargs grep -ri $1 | perl -ne 'print /\.\/(.*?)\//; print "\n";'`; do
if [[ -f $RESULT/setup.py ]]; then
cd $RESULT
NAME=`python setup.py --name 2>/dev/null`
if [[ ${DONE[@]} =~ $NAME ]]; then
echo '' > /dev/null
else
echo $NAME
findit $NAME
fi
cd $WORKING
else
echo "NON EGG $1 - $RESULT"
fi
done
}
findit "apysigner"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment