Skip to content

Instantly share code, notes, and snippets.

@ubinix-warun
Last active December 25, 2015 06:19
Show Gist options
  • Save ubinix-warun/6931249 to your computer and use it in GitHub Desktop.
Save ubinix-warun/6931249 to your computer and use it in GitHub Desktop.
Live QMLtestrunner with 'inotifywait' on Bash script
#!/bin/bash
BLD="$(tput bold)"
GRN="$(tput setab 2)"
RED="$(tput setab 1)"
BLK="$(tput sgr0)"
function test {
clear
cd ./test
qmltestrunner |
sed "s/^FAIL! /${RED}${BLD}FAIL! ${BLK}/g" |
sed "s/^PASS /${GRN}${BLD}PASS ${BLK}/g"
cd ..
}
test
while inotifywait -e modify -e create -e delete $1 ; do
test
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment