The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / support / dependencies / check-host-asciidoc.sh
1 #!/bin/sh
2
3 candidate="$1" #ignored
4
5 asciidoc=`which asciidoc`
6 if [ ! -x "$asciidoc" ]; then
7         # echo nothing: no suitable asciidoc found
8         exit 1
9 fi
10
11 # Output of 'asciidoc --version' examples:
12 # asciidoc 8.6.7
13 version=`$asciidoc --version | cut -d\  -f2`
14 major=`echo "$version" | cut -d. -f1`
15 minor=`echo "$version" | cut -d. -f2`
16 bugfix=`echo "$version" | cut -d. -f3`
17
18 # To generate the manual, we need asciidoc >= 8.6.3
19 major_min=8
20 minor_min=6
21 bugfix_min=3
22 if [ $major -gt $major_min ]; then
23         echo $asciidoc
24 else
25         if [ $major -eq $major_min -a $minor -ge $minor_min ]; then
26                 echo $asciidoc
27         else
28                 if [ $major -eq $major_min -a $minor -eq $minor_min \
29                         -a $bugfix -ge $bugfix_min ]; then
30                         echo $asciidoc
31                 else
32                         # echo nothing: no suitable asciidoc found
33                         exit 1
34                 fi
35         fi
36 fi