Changeset 463


Ignore:
Timestamp:
Oct 24, 2012, 1:06:31 AM (10 years ago)
Author:
amain
Message:

bitten: add warning message when bitten-slave is not found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/contrib/bitten/slaves/include/slaves.inc.sh

    r461 r463  
    5757   if ! bitten-slave -h | grep -q '\--exit-no-pending'
    5858   then
     59      bcount=$(find /usr/local/lib/python2.6/dist-packages -name 'Bitten-*' | wc -l)
     60
     61      if [ ${bcount} -eq 0 ]
     62      then
     63         echo "E: Can't find bitten-slave. Unable to apply patches."
     64         exit 1
     65      fi
     66
    5967      find /usr/local/lib/python2.6/dist-packages -name 'Bitten-*' \
    60        | while read dir
    61          do
    62            sudo patch -N -p 1 -d ${dir} <${BASEDIR}/patches/001_exit_no_pending.patch
    63            sudo patch -N -p 1 -d ${dir} <${BASEDIR}/patches/002_basedir_makedirs
    64          done
     68        | while read dir
     69          do
     70            set -e
     71            sudo patch -N -s -p 1 -d ${dir} <${BASEDIR}/patches/001_exit_no_pending.patch >/dev/null
     72            sudo patch -N -s -p 1 -d ${dir} <${BASEDIR}/patches/002_basedir_makedirs >/dev/null
     73            set +e
     74          done
    6575   fi
    6676}
     
    7585server_or_recipe="${recipe:-http://dev.debwrt.net}"
    7686log=${work}/bitten.log
    77 basedir='${platform}/${config}/${build}'
     87basedir='${config}/${platform}/${build}'
    7888
    7989mkdir -p ${work}
Note: See TracChangeset for help on using the changeset viewer.