sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
- From: Jaka Kranjc <smgl AT lynxlynx.info>
- To: sm-discuss AT lists.ibiblio.org
- Subject: Re: [SM-Discuss] g++ 4.3.0
- Date: Thu, 10 Apr 2008 09:27:43 +0200
On Thursday 10 of April 2008 05:34:57 Ismael Luceno wrote:
> > There should be a function to compare versions, something like:
> >
> > sver() {
> > echo $(( `sed -e 's/\./ * 2048 + /g'` ))
> > }
> >
> > I guess 11bit padding is enough...
>
> Ouch, that's wrong. A friend suggested this:
>
> echo $((sed -e ':loop;s/\([^.-]*\)[.-]/(\1) * 2048 + /;tloop' ))
>
> Still, it has some problems:
> - it should not be sensible to changes like 1.9.2 to 1.9.2.1
> - it should support letters in the version
Luckily the version patterns don't change much with individual spells and
such
comparisons are not needed often, so approaching them individually is fine.
Writting a truly generic comparison function would be a waste of time.
LP
--
We cannot command nature except by obeying her. --Sir Francis Bacon
Have a sourcerous day! www.sourcemage.org
Attachment:
signature.asc
Description: This is a digitally signed message part.
-
Re: [SM-Discuss] g++ 4.3.0
, (continued)
- Re: [SM-Discuss] g++ 4.3.0, Ladislav Hagara, 04/09/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Eric Sandall, 04/09/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Ladislav Hagara, 04/09/2008
- Re: [SM-Discuss] g++ 4.3.0, Eric Sandall, 04/09/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Ladislav Hagara, 04/09/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Jaka Kranjc, 04/09/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Eric K Sandall, 04/09/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Remko van der Vossen, 04/09/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Eric K Sandall, 04/09/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Ismael Luceno, 04/09/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Ismael Luceno, 04/09/2008
- Re: [SM-Discuss] g++ 4.3.0, Jaka Kranjc, 04/10/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Ismael Luceno, 04/09/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Remko van der Vossen, 04/10/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Jaka Kranjc, 04/10/2008
- Re: [SM-Discuss] g++ 4.3.0, Remko van der Vossen, 04/10/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Jaka Kranjc, 04/10/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Ismael Luceno, 04/09/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Eric K Sandall, 04/09/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Remko van der Vossen, 04/09/2008
-
Re: [SM-Discuss] g++ 4.3.0,
Eric K Sandall, 04/09/2008
Archive powered by MHonArc 2.6.24.