]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/host-x86_64/dist-armhf-linux/build-toolchains.sh
move an `assert!` to the right place
[rust.git] / src / ci / docker / host-x86_64 / dist-armhf-linux / build-toolchains.sh
1 #!/usr/bin/env bash
2
3 set -ex
4
5 hide_output() {
6   set +x
7   on_err="
8 echo ERROR: An error was encountered with the build.
9 cat /tmp/build.log
10 exit 1
11 "
12   trap "$on_err" ERR
13   bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
14   PING_LOOP_PID=$!
15   "$@" &> /tmp/build.log
16   rm /tmp/build.log
17   trap - ERR
18   kill $PING_LOOP_PID
19   set -x
20 }
21
22 mkdir build
23 cd build
24 cp ../arm-linux-gnueabihf.config .config
25 # FIXME ct-ng oldconfig is not working as intended.
26 # ct-ng oldconfig
27 hide_output ct-ng build
28 cd ..
29 rm -rf build