Created
July 12, 2012 21:13
-
-
Save mslinn/3101038 to your computer and use it in GitHub Desktop.
Shows all dependencies of an SBT project
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
#!/bin/bash | |
echo "Direct dependencies" | |
sbt 'show all-dependencies' | \ | |
gawk 'match($0, /List\((.*)\)/, a) {print a[1]}' | \ | |
tr -d ' ' | tr ',' '\n' | sort -t ':' | \ | |
tr ':' '\t' | expand -t 30 | |
echo -e "\nAll dependencies, including transitive dependencies" | |
sbt 'show managed-classpath' | tr -d ' ' | tr ',' '\n' | \ | |
gawk 'match($0, /Attributed\((.*)\)/, a) {print a[1]}' | \ | |
tr -d '()' | sed "s^$HOME/.ivy2/cache/^^g" | sed "s^/jars^^" | \ | |
gawk -F / '{print $1, $3}' | sort | tr ' ' '\t' | expand -t 30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample output