[icedtea-web] RFC: fix broken -J command line arguments
Omair Majid
omajid at redhat.com
Mon Mar 28 11:19:23 PDT 2011
On 03/28/2011 01:50 PM, Deepak Bhole wrote:
> * Omair Majid<omajid at redhat.com> [2011-03-28 13:38]:
>> Hi,
>>
>> The shell script launcher for javaws was not passing along
>> -J<option> command line arguments to the JVM. The attached patch
>> fixes that.
>>
>> Okay to commit?
>>
>> ChangeLog
>> 2011-03-28 Omair Majid<omajid at redhat.com>
>>
>> * launcher/javaws.in: Split out -J arguments and pass it to the JVM.
>>
>> Cheers,
>> Omair
>
>> diff -r d94fc0fb8a53 launcher/javaws.in
>> --- a/launcher/javaws.in Fri Mar 25 14:23:28 2011 -0400
>> +++ b/launcher/javaws.in Mon Mar 28 13:33:03 2011 -0400
>> @@ -7,8 +7,28 @@
>> BINARY_LOCATION=@JAVAWS_BIN_LOCATION@
>> PROGRAM_NAME=javaws
>>
>> +JAVA_ARGS=
>> +ARGS=
>> +
>> +
>> +while [ "$#" -gt "0" ]; do
>> + case "$1" in
>> + -J*)
>> + arg=`echo "$1" | awk '{print substr($0,3)}'`
>> + JAVA_ARGS="${JAVA_ARGS} $arg"
>
> This adds awk as a run time requirement.
Oh, we don't want to rely on awk?
> I think it might be better to
> remove the above 2 lines and add:
>
> JAVA_ARGS="${JAVA_ARGS} ${1:2}"
>
Isn't that a bash-ism? I thought we wanted to maintain compatibility
with sh (or it's modern derivatives like dash), as indicated in this
changeset: http://icedtea.classpath.org/hg/icedtea-web/rev/a640b4e4d226
Thanks,
Omair
More information about the distro-pkg-dev
mailing list