Lines 53-61
Link Here
|
53 |
# parse arguments |
53 |
# parse arguments |
54 |
# |
54 |
# |
55 |
|
55 |
|
|
|
56 |
strip() { |
57 |
echo `echo $1 | /bin/sed 's/^\"\(.*\)\"$/\1/'` |
58 |
} |
59 |
|
56 |
parse_args() { |
60 |
parse_args() { |
57 |
while [ $# -gt 0 ] ; do |
61 |
while [ $# -gt 0 ] ; do |
58 |
case "$1" in |
62 |
param=`strip $1` |
|
|
63 |
case "$param" in |
59 |
-h|-?|-help|--help) cat >&2 <<EOF |
64 |
-h|-?|-help|--help) cat >&2 <<EOF |
60 |
Usage: $0 {options} arguments |
65 |
Usage: $0 {options} arguments |
61 |
|
66 |
|
Lines 70-86
Link Here
|
70 |
# go on and print IDE options as well |
75 |
# go on and print IDE options as well |
71 |
args="$args --help" |
76 |
args="$args --help" |
72 |
;; |
77 |
;; |
73 |
-jdkhome|--jdkhome) shift; if [ $# -gt 0 ] ; then jdkhome=$1; fi |
78 |
-jdkhome|--jdkhome) shift; if [ $# -gt 0 ] ; then jdkhome=`strip $1`; fi |
74 |
;; |
79 |
;; |
75 |
# this has to be here for purposes of updater.jar, but it should be |
80 |
# this has to be here for purposes of updater.jar, but it should be |
76 |
# better to handle this argument inside the java launcher part |
81 |
# better to handle this argument inside the java launcher part |
77 |
-userdir|--userdir) shift; if [ $# -gt 0 ] ; then userdir="$1"; fi |
82 |
-userdir|--userdir) shift; if [ $# -gt 0 ] ; then userdir="`strip "$1"`"; fi |
78 |
;; |
83 |
;; |
79 |
-cp|-cp:a|--cp|--cp:a) |
84 |
-cp|-cp:a|--cp|--cp:a) |
80 |
shift; |
85 |
shift; |
81 |
if [ $# -gt 0 ] ; then |
86 |
if [ $# -gt 0 ] ; then |
82 |
if [ ! -z "$postfixcp" ] ; then postfixcp="$postfixcp:" ; fi |
87 |
if [ ! -z "$postfixcp" ] ; then postfixcp="$postfixcp:" ; fi |
83 |
postfixcp=$postfixcp$1; |
88 |
postfixcp=$postfixcp`strip $1`; |
84 |
fi |
89 |
fi |
85 |
;; |
90 |
;; |
86 |
|
91 |
|
Lines 88-104
Link Here
|
88 |
shift; |
93 |
shift; |
89 |
if [ $# -gt 0 ] ; then |
94 |
if [ $# -gt 0 ] ; then |
90 |
if [ ! -z "$prefixcp" ] ; then prefixcp="$prefixcp:" ; fi |
95 |
if [ ! -z "$prefixcp" ] ; then prefixcp="$prefixcp:" ; fi |
91 |
prefixcp=$prefixcp$1; |
96 |
prefixcp=$prefixcp`strip $1`; |
92 |
fi |
97 |
fi |
93 |
;; |
98 |
;; |
94 |
--clusters) |
99 |
--clusters) |
95 |
shift; |
100 |
shift; |
96 |
if [ $# -gt 0 ] ; then |
101 |
if [ $# -gt 0 ] ; then |
97 |
clusters="$1" |
102 |
clusters="`strip $1`" |
98 |
fi |
103 |
fi |
99 |
;; |
104 |
;; |
100 |
-J*) jopt=`expr "X-$1" : 'X--J\(.*\)'`; jargs="$jargs \"$jopt\"";; |
105 |
-J*) jopt=`expr "X-$param" : 'X--J\(.*\)'`; jargs="$jargs \"$jopt\"";; |
101 |
*) args="$args \"$1\"" ;; |
106 |
*) args="$args $param" ;; |
102 |
esac |
107 |
esac |
103 |
shift |
108 |
shift |
104 |
done |
109 |
done |