#!/bin/bash trap "echo Exited!; exit;" SIGINT SIGTERM result_tests_coverage='na' result_tests='na' result_rubocop='na' while : do echo " $result_tests $result_tests_coverage $result_rubocop"; rm /tmp/result_tests_coverage 2>/dev/null result_tests_coverage='na' result_tests='na' result_rubocop='na' fswatch --latency=0.3 -1 ./ >/dev/null reset bundle exec rake result_tests=$? if [ $result_tests -ne 0 ]; then continue; fi; result_tests_coverage=$(cat /tmp/result_tests_coverage 2>/dev/null) rubocop lib/ result_rubocop=$? done