summaryrefslogtreecommitdiff
path: root/tools/cpof
blob: c09ed20d6931b8a96857086c99d4d02c5d8db814 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
#
# Creates a classpath out of the contents of each directory
# given as an argument.

[[ $# == 0 ]] && { echo "Usage: $0 [dir1 dir2 ...]" && exit 0; }

sdir=$(dirname $0)
cp=""

for dir in "$@" ; do
  for x in $($sdir/abspath $dir)/* ; do
    cp="$cp:$($sdir/abspath $x)"
  done
done

# shaving the : off the beginning.
echo ${cp#:}