Changeset 8d0b68e in freewrt for scripts


Ignore:
Timestamp:
Jun 18, 2006, 12:18:32 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
4e5b696
Parents:
4ed535c
Message:

check for flex and GNU Bison
issue a warning (well, more of a suggestion) if bison is too old

ok wbx@

git-svn-id: svn://www.freewrt.org/trunk/freewrt@79 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/scan-tools.sh

    r4ed535c r8d0b68e  
    9797fi
    9898
     99if ! which flex >/dev/null 2>&1; then
     100        echo You must install flex to continue.
     101        exit 1
     102fi
     103
     104if ! which bison >/dev/null 2>&1; then
     105        echo You must install GNU Bison to continue.
     106        echo While you can install any version, it is '*STRONGLY*' suggested
     107        echo to install GNU Bison version 2.3 because of its bug fixes.
     108        exit 1
     109fi
     110X=$(bison --version 2>&1 | fgrep 'GNU Bison' | sed 's/^[^0-9]*//')
     111V=old
     112if [[ $X = +([0-9]).+([0-9]) ]]; then
     113        let major=${X%.*}
     114        let minor=${X#*.}
     115        if (( (major > 2) || ((major == 2) && (minor >= 3)) )); then
     116                V=new
     117        fi
     118fi
     119if [[ $V = old ]]; then
     120        echo It is suggested to upgrade your copy of bison to
     121        echo GNU Bison 2.3 because of its bug fixes.
     122fi
     123
    99124cd $topdir
    100125rm -rf lbin/tmp
Note: See TracChangeset for help on using the changeset viewer.