Permalink
Browse files

Updated tools/*cp scripts.

To include the asm classes in some cases, and also to improve
with my sadly now-greater knowledge of shell scripting.
  • Loading branch information...
paulp committed Jun 3, 2012
1 parent 6cdb6b0 commit a43e070e232ce35ef14fce34458ee3ea6e823078
Showing with 33 additions and 42 deletions.
  1. +11 −0 tools/buildcp
  2. +8 −20 tools/cpof
  3. +1 −7 tools/lockercp
  4. +2 −2 tools/packcp
  5. +1 −7 tools/quickcp
  6. +2 −2 tools/starrcp
  7. +8 −4 tools/strapcp
View
@@ -0,0 +1,11 @@
#!/bin/sh
#
[[ $# -eq 1 ]] || { echo "Usage: $0 <locker|quick|...>"; exit 0; }
dir=$(dirname $0)
lib=$($dir/abspath $dir/../lib)
build=$($dir/abspath $dir/../build)
cp=$($dir/cpof $build/$1/classes):$build/asm/classes
echo $cp:$lib/fjbg.jar:$lib/msil.jar:$lib/forkjoin.jar:$lib/jline.jar:$lib/extra/'*'
View
@@ -3,28 +3,16 @@
# 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
[[ $# == 0 ]] && { echo "Usage: $0 [dir1 dir2 ...]" && exit 0; }
THISDIR=`dirname $0`
ABSCMD="${THISDIR}/abspath"
CPRES=""
sdir=$(dirname $0)
cp=""
for dir in $* ; do
absdir=`${ABSCMD} $dir`
LS=`ls -1 ${absdir}`
for x in $LS ; do
ABS=`${ABSCMD} "${absdir}/${x}"`
CPRES="${CPRES}:${ABS}"
for dir in "$@" ; do
for x in $($sdir/abspath $dir)/* ; do
cp="$cp:$($sdir/abspath $x)"
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
# shaving the : off the beginning.
echo ${cp#:}
View
@@ -1,10 +1,4 @@
#!/bin/sh
#
THISDIR=`dirname $0`
ABS=${THISDIR}/abspath
LIBDIR=`$ABS $THISDIR/../lib`
cp=`${THISDIR}/cpof ${THISDIR}/../build/locker/classes`
echo ${cp}:$LIBDIR/fjbg.jar:$LIBDIR/msil.jar:$LIBDIR/forkjoin.jar:$LIBDIR/jline.jar:$LIBDIR/extra/'*'
$(dirname $0)/buildcp locker
View
@@ -1,5 +1,5 @@
#!/bin/sh
#
THISDIR=`dirname $0`
${THISDIR}/cpof ${THISDIR}/../build/pack/lib
dir=$(dirname $0)
$dir/cpof $dir/../build/pack/lib
View
@@ -1,10 +1,4 @@
#!/bin/sh
#
THISDIR=`dirname $0`
ABS=${THISDIR}/abspath
LIBDIR=`$ABS $THISDIR/../lib`
cp=`${THISDIR}/cpof ${THISDIR}/../build/quick/classes`
echo ${cp}:$LIBDIR/fjbg.jar:$LIBDIR/msil.jar:$LIBDIR/forkjoin.jar:$LIBDIR/jline.jar:$LIBDIR/extra/'*'
$(dirname $0)/buildcp quick
View
@@ -1,5 +1,5 @@
#!/bin/sh
#
THISDIR=`dirname $0`
${THISDIR}/cpof ${THISDIR}/../lib
dir=$(dirname $0)
$dir/cpof $dir/../lib
View
@@ -1,8 +1,12 @@
#!/bin/sh
#
THISDIR=`dirname $0`
cp=`${THISDIR}/cpof ${THISDIR}/../build/strap/classes`
fjbg=`${THISDIR}/abspath ${THISDIR}/../lib/fjbg.jar`
dir=$(dirname $0)
strap="$dir/../build/strap/classes"
[[ -d $strap ]] || { echo "Error: no directory at $strap"; exit 1; }
echo ${cp}:${fjbg}
cp=$($dir/cpof $strap)
fjbg=$($dir/abspath $dir/../lib/fjbg.jar)
asm=$($dir/abspath $dir/../build/asm/classes)
echo $cp:$fjbg:$asm

0 comments on commit a43e070

Please sign in to comment.