Skip to content

Instantly share code, notes, and snippets.

@jcromartie
Created November 6, 2009 02:47
Show Gist options
  • Save jcromartie/227662 to your computer and use it in GitHub Desktop.
Save jcromartie/227662 to your computer and use it in GitHub Desktop.
classpath.sh -- build classpaths
#/bin/bash
# strings together all of its arguments into a Java classpath, useful for
# grabbing all of the jars in a directory like so:
# classpath.sh lib/*.jar
#
DELIM=
CLASSPATH=
for PATH_PART in "$@"
do
CLASSPATH="$CLASSPATH$DELIM$PATH_PART"
DELIM=:
done
echo $CLASSPATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment