]> source.dussan.org Git - sonarqube.git/commitdiff
BUILD: display the date every minute in travis builds
authorTom <thomas.verin@sonarsource.com>
Wed, 11 Jan 2017 09:10:21 +0000 (10:10 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 12 Jan 2017 15:20:38 +0000 (16:20 +0100)
clock.sh [new file with mode: 0755]
travis.sh

diff --git a/clock.sh b/clock.sh
new file mode 100755 (executable)
index 0000000..91c2c58
--- /dev/null
+++ b/clock.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+RED='\033[0;31m'
+NC='\033[0m' # No Color
+
+echo "start the clock"
+while [ ! -f stop ]; do
+  #echo "File not found!"
+  seconds=60; date1=$((`date +%s` + $seconds)); 
+  while [ "$date1" -ge `date +%s` ]; do 
+    #echo -ne "$(date -u --date @$(($date1 - `date +%s` )) +%H:%M:%S)\r"; > /dev/null
+    : #busy wait
+  done
+  printf "${RED}############# `date` ############${NC}\n"
+done
\ No newline at end of file
index ac764993ee6fbcd5214759e9f88e343ffcc6079c..0b9e852dcf82f947c971da72be9bd46d91276bcb 100755 (executable)
--- a/travis.sh
+++ b/travis.sh
@@ -24,6 +24,8 @@ function configureTravis {
 configureTravis
 . installJDK8
 
+./clock.sh &
+
 case "$TARGET" in
 
 CI)
@@ -103,3 +105,6 @@ WEB)
   ;;
 
 esac
+
+#stop the clock
+touch stop
\ No newline at end of file