Re: [PATCH v3] configure: silence 'shift' error message in version_ge()

2020-08-21 Thread Eric Blake
On 8/21/20 3:35 PM, Stefano Garzarella wrote: If there are less than 2 arguments in version_ge(), the second 'shift' prints this error: ../configure: line 232: shift: shift count out of range As Eric suggested, we can use 'shift ${2:+2}' which works out to 'shift 2' if $2 is set, or 'shift'

[PATCH v3] configure: silence 'shift' error message in version_ge()

2020-08-21 Thread Stefano Garzarella
If there are less than 2 arguments in version_ge(), the second 'shift' prints this error: ../configure: line 232: shift: shift count out of range As Eric suggested, we can use 'shift ${2:+2}' which works out to 'shift 2' if $2 is set, or 'shift' (implicitly shift 1) if $2 is not set. This pat