Changeset fa281a9 in freewrt


Ignore:
Timestamp:
Jul 22, 2006, 5:02:04 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
e13d736
Parents:
fedf8f4
Message:

instead of aborting as soon as an error is found,
try to do as many checks as possible (taking into
account that e.g. if the compiler, make or gzip are
not found, some later tests will fail too)

after discussion with wbx@ some days ago

also remove the confusing redundant clause,
spotted by nbd, ok wbx@

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

Location:
scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • scripts/scan-pkgs.sh

    rfedf8f4 rfa281a9  
    1818# linked into a bigger work whose licence does not allow such clause
    1919# and the author of this work is given due credit in the bigger work
    20 # or its documentation. Specifically, re-using this code in any work
    21 # covered by the GNU General Public License version 1 or Library Ge-
    22 # neral Public License (any version) is permitted.
     20# or its documentation.
    2321#
    2422# Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind,
     
    4139topdir=$(readlink -nf $(dirname $0)/..)
    4240export PATH=$topdir/lbin:$PATH
     41out=0
    4342
    4443. $topdir/.config
     
    5554        if ! which jikes >/dev/null 2>&1; then
    5655                echo >&2 You need jikes to build $NEED_JIKES
    57                 exit 1
     56                out=1
    5857        fi
    5958fi
     
    6160#-- end of dependency checks
    6261
    63 exit 0
     62exit $out
  • scripts/scan-tools.sh

    rfedf8f4 rfa281a9  
    1818# linked into a bigger work whose licence does not allow such clause
    1919# and the author of this work is given due credit in the bigger work
    20 # or its documentation. Specifically, re-using this code in any work
    21 # covered by the GNU General Public License version 1 or Library Ge-
    22 # neral Public License (any version) is permitted.
     20# or its documentation.
    2321#
    2422# Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind,
     
    4139topdir=$(pwd)
    4240export PATH=$topdir/lbin:$PATH
     41out=0
    4342
    4443if [[ $NO_ERROR != @(0|1) ]]; then
     
    7675        echo You must install GNU make and a host C compiler,
    7776        echo usually GCC, to proceed.
    78         exit 1
     77        out=1
    7978fi
    8079rm test*
     
    9392else
    9493        echo Cannot determine GNU make version number.
    95         exit 1
     94        out=1
    9695fi
    9796if (( (major < 3) || ((major == 3) && (minor < 81)) )); then
     
    102101        else
    103102                echo You can override this check, see http://www.freewrt.org/faq for details.
    104                 exit 1
     103                out=1
    105104        fi
    106105fi
     
    108107if ! which flex >/dev/null 2>&1; then
    109108        echo You must install flex to continue.
    110         exit 1
     109        out=1
    111110fi
    112111
     
    120119                echo You can continue the build by issuing \'make prereq-noerror\'
    121120                echo However, several packages may faild to build correctly.
    122                 exit 1
     121                out=1
    123122        fi
    124123fi
     
    128127        echo While you can install any version, it is '*STRONGLY*' suggested
    129128        echo to install GNU Bison version 2.3 because of its bug fixes.
    130         exit 1
     129        out=1
    131130fi
    132131X=$(bison --version 2>&1 | fgrep 'GNU Bison' | sed 's/^[^0-9]*//')
     
    146145if ! which gzip >/dev/null 2>&1; then
    147146        echo You must install gzip to continue.
    148         exit 1
     147        out=1
    149148fi
    150149
    151150if ! which bzip2 >/dev/null 2>&1; then
    152151        echo You must install bzip2 to continue.
    153         exit 1
     152        out=1
    154153fi
    155154
    156155if ! which unzip >/dev/null 2>&1; then
    157156        echo You must install unzip to continue, sorry.
    158         exit 1
     157        out=1
    159158fi
    160159
    161160if ! which patch >/dev/null 2>&1; then
    162161        echo You must install patch \(from Larry Wall\) to continue.
    163         exit 1
     162        out=1
    164163fi
    165164
     
    194193        echo You must install the zlib development package,
    195194        echo usually called libz-dev, and the run-time library.
    196         exit 1
     195        out=1
    197196fi
    198197
    199198if ! which g++ >/dev/null 2>&1; then
    200199        echo You must install the host GNU C++ compiler to continue.
    201         exit 1
     200        out=1
    202201fi
    203202
     
    205204if [[ "$(which perl 2>/dev/null)" != /usr/bin/perl ]]; then
    206205        echo You must install Perl in /usr/bin to continue.
    207         exit 1
     206        out=1
    208207fi
    209208
    210209if ! which python >/dev/null 2>&1; then
    211210        echo You must install Python to continue, sorry.
    212         exit 1
     211        out=1
    213212fi
    214213
    215214if ! which wget >/dev/null 2>&1; then
    216215        echo You must install GNU wget to continue.
    217         exit 1
     216        out=1
    218217fi
    219218
     
    221220cd $topdir
    222221rm -rf lbin/tmp
    223 exit 0
     222exit $out
Note: See TracChangeset for help on using the changeset viewer.