File: cpof

package info (click to toggle)
scala 2.11.12-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 62,776 kB
  • sloc: java: 13,415; xml: 3,252; sh: 1,620; python: 756; makefile: 38; awk: 36; ansic: 6
file content (18 lines) | stat: -rwxr-xr-x 344 bytes parent folder | download | duplicates (3)
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#:}