[vlc-commits] tools: compare micro version
Sean McGovern
git at videolan.org
Wed Apr 9 09:05:17 CEST 2014
vlc | branch: master | Sean McGovern <gseanmcg at gmail.com> | Tue Apr 8 22:55:20 2014 -0400| [5994f35b208c7c9ebebf4f225fc45a79b87835e9] | committer: Rafaël Carré
tools: compare micro version
Some tools differ significantly between micro revisions.
Signed-off-by: Rafaël Carré <funman at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5994f35b208c7c9ebebf4f225fc45a79b87835e9
---
extras/tools/bootstrap | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/extras/tools/bootstrap b/extras/tools/bootstrap
index fcd3f10..fb3fbc0 100755
--- a/extras/tools/bootstrap
+++ b/extras/tools/bootstrap
@@ -51,13 +51,18 @@ then
else
# found, need to check version ?
[ -z "$2" ] && return # no
- # we only check GNU tools, their version have the form MAJOR.MINOR
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`
+ [ -z "$gotmicro" ] && gotmicro=0
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`
+ [ -z "$needmicro" ] && needmicro=0
+ if [ "$needmajor" -gt "$gotmajor" \
+ -o "$needmajor" -eq "$gotmajor" -a "$needminor" -gt "$gotminor" \
+ -o "$needmajor" -eq "$gotmajor" -a "$needminor" -eq "$gotminor" -a "$needmicro" -gt "$gotmicro" ]
then
echo "$1 too old"
NEEDED="$NEEDED .$1"
More information about the vlc-commits
mailing list