[vlc-devel] [PATCH 1/2] tools: compare micro version
Rafaël Carré
funman at videolan.org
Sun Apr 6 22:08:17 CEST 2014
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.
> 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
> needmajor=`echo $2|cut -d. -f1`
> needminor=`echo $2|cut -d. -f2`
> - if [ "$needmajor" -gt "$gotmajor" -o "$needmajor" -eq "$gotmajor" -a "$needminor" -gt "$gotminor" ]
> + needmicro=`echo $2|cut -d. -f3`
> + if [ "$needmajor" -gt "$gotmajor" -o "$needmajor" -eq "$gotmajor" -a "$needminor" -gt "$gotminor" \
> + -o "$needmicro" -gt "$gotmicro" ]
> then
> echo "$1 too old"
> NEEDED="$NEEDED .$1"
>
More information about the vlc-devel
mailing list