diff options
Diffstat (limited to 'tools/cpof')
-rwxr-xr-x | tools/cpof | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/cpof b/tools/cpof new file mode 100755 index 0000000000..ab5a42b4fb --- /dev/null +++ b/tools/cpof @@ -0,0 +1,30 @@ +#!/bin/sh +# +# Creates a classpath out of the contents of each directory +# given as an argument. + +if [ $# == 0 ] ; then + echo "Usage: $0 [dir1 dir2 ...]" + exit 1 +fi + +THISDIR=`dirname $0` +ABSCMD="${THISDIR}/abspath" +CPRES="" + +for dir in $* ; do + absdir=`${ABSCMD} $dir` + LS=`ls -1 ${absdir}` + + for x in $LS ; do + ABS=`${ABSCMD} "${absdir}/${x}"` + CPRES="${CPRES}:${ABS}" + done +done + +# shaving the : off the beginning. Applause to /bin/sh for +# keeping us humble about how far we've come. +LEN=$(( ${#CPRES} - 1 )) +result=${CPRES:1:${LEN}} + +echo $result |