[vlc-devel] [PATCH 1/2] tools: compare micro version

Sean McGovern gseanmcg at gmail.com
Sun Apr 6 22:46:08 CEST 2014


On Sun, Apr 6, 2014 at 4:08 PM, Rafaël Carré <funman at videolan.org> wrote:

> On 04/06/14 18:01, Sean McGovern wrote:
> > Some tools differ significantly between micro revisions.
> > ---
> >  extras/tools/bootstrap |    7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/extras/tools/bootstrap b/extras/tools/bootstrap
> > index fcd3f10..e956b18 100755
> > --- a/extras/tools/bootstrap
> > +++ b/extras/tools/bootstrap
> > @@ -51,13 +51,16 @@ then
> >  else
> >      # found, need to check version ?
> >      [ -z "$2" ] && return # no
> > -    # we only check GNU tools, their version have the form MAJOR.MINOR
> > +    # we only check GNU tools, their version have the form
> MAJOR.MINOR.MICRO
>
> The comment has been invalid for a long time and should be removed.
>

OK. Amended locally.


>
> >      gotver=`$1 --version | head -1 | sed s/'.* '//`
> >      gotmajor=`echo $gotver|cut -d. -f1`
> >      gotminor=`echo $gotver|cut -d. -f2`
> > +    gotmicro=`echo $gotver|cut -d. -f3`
>
> I think [ "" -gt 3 ] is not valid
>
>
Argh! You're right:

sean at nozomi:/var/tmp$ more blah.sh

if [ "" -gt "3" ]; then

   echo blah
fi

earns me:

sean at nozomi:/var/tmp$ ./blah.sh
./blah.sh: line 3: [: : integer expression expected

-- Sean McG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140406/87ff058e/attachment.html>


More information about the vlc-devel mailing list