configure: Silence shift warning in version_ge()
PATCH 1/1 configure: Silence shift warning in version_ge()
As we might expect less than 2 argument, only shift again if there is arguments to shift.
This fixes:
../configure: line 232: shift: shift count out of range
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
@@ -229,7 +229,7 @@ version_ge () { set x $local_ver1 local_first=${2-0} # shift 2 does nothing if there are less than 2 arguments - shift; shift + shift || shift local_ver1=$* set x $local_ver2 # the second argument finished, the first must be greater or equal
Signature · 1 line
2.26.2
Quoted 17 lines · Philippe Mathieu-Daudé
As we might expect less than 2 argument, only shift again if there is arguments to shift.
This fixes:
../configure: line 232: shift: shift count out of range
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)configure +0
-0
configure version_ge () { · line 232
Quoted 5 lines
configure +1
-1@@ -229,7 +229,7 @@ version_ge () { set x $local_ver1 local_first=${2-0} # shift 2 does nothing if there are less than 2 arguments - shift; shift + shift || shift
As Stefano noted, this does not work as intended, so please discard this invalid patch.
Quoted 4 lines
configure +0
-0local_ver1=$* set x $local_ver2 # the second argument finished, the first must be greater or equal