Created
March 20, 2017 09:27
-
-
Save yurrriq/3af1a843148dc1e2d96924098341f673 to your computer and use it in GitHub Desktop.
Keep Travis CI alive by printing every minute
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Taken from: | |
# https://github.com/mmhelloworld/idris-jvm/blob/aa5049a/bin/travis_long | |
$* & | |
pidA=$! | |
minutes=0 | |
while true; do sleep 60; ((minutes++)); echo -e "\033[0;32m$minutes minute(s) elapsed.\033[0m"; done & | |
pidB=$! | |
wait $pidA | |
exitCode=$? | |
echo -e "\033[0;32m$* finished.\033[0m" | |
kill -9 $pidB | |
exit $exitCode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment