X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=jpctb;h=c55f90cbb5c6df97094c5f1062034c404070825c;hb=9989791d333f8acc5fa50cda7b79763908bf59c7;hp=24b3268f13ecd19afcc0accf9e054ca6d5743100;hpb=86b3ff3ab527ca9d4cbcc7e9b7d9c0fd69b3afa9;p=jarrg-ian.git diff --git a/jpctb b/jpctb index 24b3268..c55f90c 100755 --- a/jpctb +++ b/jpctb @@ -24,7 +24,7 @@ usage () { cat <&2 "jpctb: $*" exit 127 } +badusage () { + fail "bad usage: $*" +} -if [ $# -lt 2 ]; then usage; fail 'bad usage'; exit 127; fi +while [ $# -ge 1 ]; do + case "$1" in + -) shift; break;; + --jpctb) + shift + srcjardir="$1" + shift || badusage "--jpctb needs a value" + ;; + -*) badusage "unknown option \`$1'" + ;; + *) + break + esac +done + +if [ $# -lt 1 ]; then usage; badusage "need path to yohoho"; exit 127; fi -srcjardir="$1"; shift yohoho="$1"; shift #---------- find ourselves ---------- @@ -48,19 +65,71 @@ case "$jpctbdir" in *) jpctbdir="$PWD/$jpctbdir" ;; esac +if [ x"$srcjardir" = x ]; then + srcjardir="$jpctbdir" +fi + #---------- find YPP client and the Java installation it uses ---------- yppdir="${yohoho%/*}" +cat <"$wrapper" #!/bin/bash