X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=jpctb;h=c5bf4aae20fc2034772a8046b68d4a637f103f2b;hb=2f9d258269d321a48fc20919811bf944cc099248;hp=4446b2d54d98321961f3f7d6d91ceac080d034a6;hpb=2b0715a23111c578b0256e1eef24d0f8c7355275;p=jarrg-ian.git diff --git a/jpctb b/jpctb index 4446b2d..c5bf4aa 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,64 @@ 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