[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] for sh portability issue in davautocheck.sh

From: Max Bowsher <maxb1_at_ukf.net>
Date: 2007-03-28 02:53:09 CEST

Max Bowsher wrote:
> Louis Guillaume wrote:
>> Hi,
>>
>> The attached patch should fix a portability problem in subversion/tests/cmdline/davautocheck.sh.
>>
>> * subversion/tests/cmdline/davautocheck.sh
>> Fixed some instances of Bourne shell features that are not portable:
>> (1) Removed all instances of `==' in `test' or `[' statements.
>
> Committed.
>
>> (2) Replaced use of `$RANDOM' with `(( $$ % 32768 ))'.
>
> Why 32768?
>
> IMO:
> HTTPD_PORT=$(( $$ % 64511 + 1024 ))
>
> is a more suitable calculation.

Note that the use of $RANDOM seems entirely fine to me, so long as the
shebang line is still specifying /bin/bash explicitly.

Max.

Received on Wed Mar 28 02:53:29 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.