3 # checkit: Test for correct versions of utilities
4 # (see the end of the file for bypassing these checks)
6 # Copyright 2005-2007 John Coffman
7 # Copyright 2009-2010 Joachim Wiedorn
10 # Licensed under the terms contained in the file 'COPYING'
11 # in the source directory.
18 # min. version of BCC, AD86, LD86
21 # min. version of GCC, CPP
28 # get our version major, minor, rev
29 M=`echo $1 | cut -d . -f 1`
30 m=`echo $1 | cut -d . -f 2`
31 p=`echo $1 | cut -d . -f 3`
32 if [ -z "$p" ]; then p=0; fi
33 #echo vers_min1 $M $m $p
34 N=`echo $2 | cut -d . -f 1`
35 n=`echo $2 | cut -d . -f 2`
36 r=`echo $2 | cut -d . -f 3`
37 #echo vers_min2 $N $n $r
38 if [ "$M" -lt "$N" ]; then rc=1
39 elif [ "$M" -gt "$N" ]; then rc=0
40 elif [ "$m" -lt "$n" ]; then rc=1
41 elif [ "$m" -gt "$n" ]; then rc=0
42 elif [ -z "$r" ]; then rc=0
43 elif [ "$p" -lt "$r" ]; then rc=1
45 #echo vers_min returns $rc
50 echo GCC version $gccmin or later is required
52 V=`cat foo1 foo2 | cut -d' ' -f1-3 | grep -i version | tr '-' ' ' | cut -d' ' -f 3`
55 echo gcc is not present
60 if [ $rc = 0 ]; then echo OKAY; else echo ERROR; ret=1; fi
64 echo AS86 version $bccmin or later is required
66 A=`cat foo1 foo2 | grep version | cut -d " " -f 3`
69 echo as86 is not present
74 if [ $rc = 0 ]; then echo OKAY; else echo ERROR; ret=1; fi
78 echo LD86 version $bccmin or later is required
80 L=`cat foo1 foo2 | grep version | cut -d " " -f 3`
83 echo ld86 is not present
88 if [ $rc = 0 ]; then echo OKAY; else echo ERROR; ret=1; fi
92 echo BCC version $bccmin or later is recommended
94 B=`cat foo1 foo2 | grep version | cut -d " " -f 3`
97 echo bcc is not present
98 echo You will not be able to make floppy2, diag2.img, or lilo.com
102 if [ $rc = 0 ]; then echo OKAY; else echo ERROR; fi
107 # Uncomment the line below to bypass all the checks