linux-firmware: bump version
[buildroot-gz.git] / support / dependencies / check-host-asciidoc.sh
blobfc5fcba4435f0ff34f6e8efbcd7728d893821809
1 #!/bin/sh
3 candidate="$1" #ignored
5 asciidoc=`which asciidoc`
6 if [ ! -x "$asciidoc" ]; then
7 # echo nothing: no suitable asciidoc found
8 exit 1
9 fi
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`
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