Skip to content

Instantly share code, notes, and snippets.

@jimbaker
Created March 7, 2014 18:07
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 jimbaker/9416644 to your computer and use it in GitHub Desktop.
Save jimbaker/9416644 to your computer and use it in GitHub Desktop.
Makes a classpath compatible list of paths, including expanding all globs and making all paths absolute. Run like so: export CLASSPATH=$CLASSPATH:$(alljars some/*/*.jar)
#!/usr/bin/env python
import glob
import os
import sys
def main():
cwd = os.getcwd()
print ":".join(os.path.normpath(os.path.join(cwd, path)) for path in sys.argv[1:])
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment