]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/dist-fuchsia/shared.sh
Add build environment for Solaris
[rust.git] / src / ci / docker / dist-fuchsia / shared.sh
1 # Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2 # file at the top-level directory of this distribution and at
3 # http://rust-lang.org/COPYRIGHT.
4 #
5 # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 # option. This file may not be copied, modified, or distributed
9 # except according to those terms.
10
11 hide_output() {
12   set +x
13   on_err="
14 echo ERROR: An error was encountered with the build.
15 cat /tmp/build.log
16 exit 1
17 "
18   trap "$on_err" ERR
19   bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
20   PING_LOOP_PID=$!
21   "$@" &> /tmp/build.log
22   trap - ERR
23   kill $PING_LOOP_PID
24   set -x
25 }