[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make git-version-gen compatible with dash shell
From: |
Mosè Giordano |
Subject: |
Re: Make git-version-gen compatible with dash shell |
Date: |
Sun, 8 May 2016 20:32:17 +0200 |
Hi Paul,
2016-05-08 20:21 GMT+02:00 Paul Eggert <address@hidden>:
> Mosè Giordano wrote:
>> the attached patch makes git-version-gen compatible with dash shell,
>> whose shift built-in aborts when there are no more arguments.
>
> Can you explain why that patch is needed? The 'shift' is inside a 'while test
> $#
> -gt 0' loop, so I don't see how $# could be zero there. What's the use case
> and
> behavior without the patch?
$# is 0 if you provide --prefix or --fallback option, for example,
because shift is run within the case, before being run another time at
the end of while-loop. Without the patch I get a
shift: can't shift that many
error. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627856
Bye,
Mosè