Re: [PATCH 03/11] configure: Use single square brackets (POSIX)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Feel free to send those including my 03/11 if they are bash things.
I happened to just find [[...]] one without using tools.

There was one remove-bash-ism commit in the past too (40cfddb4 in 2010).

2017-05-02 8:36 GMT+03:00 Sitsofe Wheeler <sitsofe@xxxxxxxxx>:
> On 1 May 2017 at 19:48,  <kusumi.tomohiro@xxxxxxxxx> wrote:
>> From: Tomohiro Kusumi <tkusumi@xxxxxxxxxx>
>>
>> Avoid "if [[...]]" format which seems to be bash extension.
>
> According to http://www.shellcheck.net/ , ./configure has a few other
> bashims in it:
>
> Line 16:
> TMPC="${TMPDIR1}/fio-conf-${RANDOM}-$$-${RANDOM}.c"
>                                        ^-- SC2039: In POSIX sh, RANDOM
> is undefined.
>
> Line 17:
> TMPO="${TMPDIR1}/fio-conf-${RANDOM}-$$-${RANDOM}.o"
>                           ^-- SC2039: In POSIX sh, RANDOM is undefined.
>                                        ^-- SC2039: In POSIX sh, RANDOM
> is undefined.
>
> Line 18:
> TMPE="${TMPDIR1}/fio-conf-${RANDOM}-$$-${RANDOM}.exe"
>                                        ^-- SC2039: In POSIX sh, RANDOM
> is undefined.
>                           ^-- SC2039: In POSIX sh, RANDOM is undefined.
>
> Line 109:
>   type "$1" >/dev/null 2>&1
>   ^-- SC2039: In POSIX sh, 'type' is undefined.
>
> Line 1685:
>   if [[ $? -eq 0 ]]; then
>      ^-- SC2039: In POSIX sh, [[ ]] is undefined.
>         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;',
> not indirectly with $?.
>
> --
> Sitsofe | http://sucs.org/~sits/
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux