summaryrefslogtreecommitdiff
path: root/tools/cpof
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-02-15 20:00:36 +0000
committerPaul Phillips <paulp@improving.org>2010-02-15 20:00:36 +0000
commit821229741d41ab5a0087ddf289ee01b92e9c0685 (patch)
tree1306ddc619017d903c2bceb35ba37ba27cc27dbf /tools/cpof
parent369d3ca26f05ab848807c109e464f90f2e668c81 (diff)
downloadscala-821229741d41ab5a0087ddf289ee01b92e9c0685.tar.gz
scala-821229741d41ab5a0087ddf289ee01b92e9c0685.tar.bz2
scala-821229741d41ab5a0087ddf289ee01b92e9c0685.zip
Some new tools for the tools directory.
amounts to a yak shaving expedition to enable this, which now works: tools/diffPickled scala.Either and since stability is presently broken you will see the following. (When it's not broken you will see nothing.) 541,544c541,544 < 538,4090: EXTref 3: 539(Left) 2 < 539,4095: TYPEname 4: Left < 540,4101: EXTref 3: 541(Right) 2 < 541,4106: TYPEname 5: Right --- > 538,4090: EXTref 3: 539(Right) 2 > 539,4095: TYPEname 5: Right > 540,4102: EXTref 3: 541(Left) 2 > 541,4107: TYPEname 4: Left
Diffstat (limited to 'tools/cpof')
-rwxr-xr-xtools/cpof30
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