Skip to content

Instantly share code, notes, and snippets.

@yuhanz
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuhanz/8002c696fbac9dd35ff2 to your computer and use it in GitHub Desktop.
Save yuhanz/8002c696fbac9dd35ff2 to your computer and use it in GitHub Desktop.
Find all the .class file in .jar files under lib/ folder, and write them as "imports" scala statement and store into a file
find lib -name \*.jar -exec unzip -v {} \; | grep -oh --color=never '[^[:space:]]*class$' | tr / . | sed -E 's/^(.*).class$/import \1/' > /tmp/imports.scala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment