Skip to content

Instantly share code, notes, and snippets.

@yurrriq
Created March 20, 2017 09:27
Show Gist options
  • Save yurrriq/3af1a843148dc1e2d96924098341f673 to your computer and use it in GitHub Desktop.
Save yurrriq/3af1a843148dc1e2d96924098341f673 to your computer and use it in GitHub Desktop.
Keep Travis CI alive by printing every minute
#!/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