]> git.proxmox.com Git - rustc.git/blob - src/ci/docker/dist-armhf-linux/build-toolchains.sh
New upstream version 1.18.0+dfsg1
[rustc.git] / src / ci / docker / dist-armhf-linux / build-toolchains.sh
1 #!/bin/bash
2 # Copyright 2017 The Rust Project Developers. See the COPYRIGHT
3 # file at the top-level directory of this distribution and at
4 # http://rust-lang.org/COPYRIGHT.
5 #
6 # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7 # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8 # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9 # option. This file may not be copied, modified, or distributed
10 # except according to those terms.
11
12 set -ex
13
14 hide_output() {
15 set +x
16 on_err="
17 echo ERROR: An error was encountered with the build.
18 cat /tmp/build.log
19 exit 1
20 "
21 trap "$on_err" ERR
22 bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
23 PING_LOOP_PID=$!
24 $@ &> /tmp/build.log
25 rm /tmp/build.log
26 trap - ERR
27 kill $PING_LOOP_PID
28 set -x
29 }
30
31 mkdir build
32 cd build
33 cp ../arm-linux-gnueabihf.config .config
34 ct-ng oldconfig
35 hide_output ct-ng build
36 cd ..
37 rm -rf build