build/Makefile: deepclean: make grep more strict
[fuel.git] / build / fuel_build_loop
1 #!/bin/bash
2 ##############################################################################
3 # Copyright (c) 2016 Ericsson AB and others.
4 # stefan.k.berg@ericsson.com
5 # jonas.bjurel@ericsson.com
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
11
12 echo "MIRROR_MOS_UBUNTU_ROOT=${MIRROR_MOS_UBUNTU_ROOT}"
13 echo "MIRROR_FUEL=${MIRROR_FUEL}"
14
15 maxcount=3
16 cnt=0
17 rc=1
18 while [ $cnt -lt $maxcount ] && [ $rc -ne 0 ]
19 do
20     cnt=$[cnt + 1]
21     echo -e "\n\n\n*** Starting build attempt # $cnt"
22     cd /tmp/fuel-main
23     make iso
24     rc=$?
25     if [ $rc -ne 0 ]; then
26         echo "### Build failed with rc $rc ###"
27     else
28         echo "### Build successful at attempt # $cnt"
29     fi
30 done
31 exit $rc