OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 # | 5 # |
6 | 6 |
7 # The nacl-install-{linux,mac,windows}-*.sh scripts should source this script. | 7 # The nacl-install-{linux,mac,windows}-*.sh scripts should source this script. |
8 # | 8 # |
9 | 9 |
10 set -o nounset | 10 set -o nounset |
11 set -o errexit | 11 set -o errexit |
12 | 12 |
13 RESULT=0 | 13 RESULT=0 |
14 MESSAGES= | 14 MESSAGES= |
15 | 15 |
16 BuildSuccess() { | 16 BuildSuccess() { |
17 echo "naclports nacl-install-all: Install SUCCEEDED $1 \ | 17 echo "naclports nacl-install-all: Install SUCCEEDED $1 ($NACL_ARCH)" |
18 ($NACL_PACKAGES_BITSIZE)" | |
19 } | 18 } |
20 | 19 |
21 BuildFailure() { | 20 BuildFailure() { |
22 MESSAGE="naclports nacl-install-all: Install FAILED for $1 \ | 21 MESSAGE="naclports nacl-install-all: Install FAILED for $1 ($NACL_ARCH)" |
23 ($NACL_PACKAGES_BITSIZE)" | |
24 echo $MESSAGE | 22 echo $MESSAGE |
25 echo "@@@STEP_FAILURE@@@" | 23 echo "@@@STEP_FAILURE@@@" |
26 MESSAGES="$MESSAGES\n$MESSAGE" | 24 MESSAGES="$MESSAGES\n$MESSAGE" |
27 RESULT=1 | 25 RESULT=1 |
28 } | 26 } |
29 | 27 |
30 BuildPackage() { | 28 BuildPackage() { |
31 if make $1 ; then | 29 if make $1 ; then |
32 BuildSuccess $1 | 30 BuildSuccess $1 |
33 else | 31 else |
34 if [ ${BUILDBOT_BUILDERNAME:0:3} = win ] ; then | 32 if [ ${BUILDBOT_BUILDERNAME:0:3} = win ] ; then |
35 echo "@@@STEP_WARNINGS@@@" | 33 echo "@@@STEP_WARNINGS@@@" |
36 for i in 1 2 3 ; do | 34 for i in 1 2 3 ; do |
37 if make $1 ; then | 35 if make $1 ; then |
38 BuildSuccess $1 | 36 BuildSuccess $1 |
39 return | 37 return |
40 fi | 38 fi |
41 done | 39 done |
42 fi | 40 fi |
43 BuildFailure $1 | 41 BuildFailure $1 |
44 fi | 42 fi |
45 } | 43 } |
OLD | NEW |