diff options
author | Björn Gustavsson <[email protected]> | 2017-03-08 07:29:44 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-03-08 07:29:44 +0100 |
commit | d2e05787454aebc8406a2f781b2648c552019763 (patch) | |
tree | 11a9e52323c228806be71ea9bde7e1ce2819cc39 /scripts/build-otp | |
parent | a52c18365acb5ed55793351ff3b3776a2a848503 (diff) | |
parent | 0fe6927bf752226270b191282375a031768d8be3 (diff) | |
download | otp-d2e05787454aebc8406a2f781b2648c552019763.tar.gz otp-d2e05787454aebc8406a2f781b2648c552019763.tar.bz2 otp-d2e05787454aebc8406a2f781b2648c552019763.zip |
Merge branch 'maint'
* maint:
Travis CI: Avoid that builds gets killed for inactivity
Diffstat (limited to 'scripts/build-otp')
-rwxr-xr-x | scripts/build-otp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/scripts/build-otp b/scripts/build-otp index 388fa8c276..da09fb8045 100755 --- a/scripts/build-otp +++ b/scripts/build-otp @@ -1,12 +1,31 @@ #!/bin/bash +function progress { + local file=$1 + ls=$(ls -l $file) + while [ true ]; do + sleep 10 + new_ls=$(ls -l $file) + if [ "$new_ls" != "$ls" ]; then + echo -n "." + fi + ls="$new_ls" + done +} + function do_and_log { log="scripts/latest-log.$$" - echo -n "$1... " + echo "" >$log + echo -n "$1..." + (progress $log) & + pid=$! + disown if ./otp_build $2 $3 >$log 2>&1; then - echo "done." + kill $pid >/dev/null 2>&1 + echo " done." else - echo "failed." + kill $pid >/dev/null 2>&1 + echo " failed." tail -n 200 $log echo "*** Failed ***" exit 1 |