re-run watcher if there are more running jobs
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 22 Dec 2016 21:49:11 +0000 (22:49 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 22 Dec 2016 21:49:11 +0000 (22:49 +0100)
gnt-running.sh

index 2d70ccf..f65b3d9 100755 (executable)
@@ -1,2 +1,4 @@
 #!/bin/sh -xe
-gnt-job list --no-headers --running | awk '{ print $1 }' | xargs gnt-job watch
+while true ; do
+gnt-job list --no-headers --running | tee /dev/stderr | awk '{ print $1 }' | xargs gnt-job watch
+done