Re: recent patch breaks the build ?
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 17, 2005, 11:15 UTC
- Message-ID
- <Pine.LNX.4.63.0511171213370.29989@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <7voe4jy36p.fsf@assigned-by-dhcp.cox.net>
Hi,
On Thu, 17 Nov 2005, Junio C Hamano wrote:
Show 17 quoted lines
> Nick Hengeveld <nickh@reactrix.com> writes: > > > Assuming --vernum does work, is there a reasonable/portable way to > > compare two hex values like 070801? > > I would assume that it is always 6 lowercase hexdigits %06x when > supported, or showing nothing to stdout for ancient ones. > > A horrible but probably portable way would be: > > case `(echo 070801; curl-config --vernum) 2>/dev/null | > sort -r | sed -ne 2p` in > 070801) > echo Happy ;; > *) > echo Sad ;; > esac
Horrible to read, but actually portable (and can be produced by a small script):
case "$NUMBER" in 07080[1-9] | \ 0708[1-9]? | \ 0709?? | \ 07[1-9]??? | \ 0[8-9]???? | \ [1-9]?????) echo "Yes";; *) echo "No";; esac
Ciao, Dscho