Skip to content

Instantly share code, notes, and snippets.

@chris-gunawardena
Created June 12, 2014 04:07
Show Gist options
  • Save chris-gunawardena/6ca65515a8ca7b1203a6 to your computer and use it in GitHub Desktop.
Save chris-gunawardena/6ca65515a8ca7b1203a6 to your computer and use it in GitHub Desktop.
while true; \
do \
wget --quiet -O - "http://jit.rmit.co.vu:8181/job/RMIT%20Public%20website/lastBuild/api/xml?depth=1&tree=building,result" \
| sed -r 's/<freeStyleBuild><building>true<\/building><\/freeStyleBuild>/\/cygdrive\/c\/buildLight\/USBCMDAP.exe 0 0 101 2 3\n/' \
| sed -r 's/<freeStyleBuild><building>false<\/building><result>FAILURE<\/result><\/freeStyleBuild>/\/cygdrive\/c\/buildLight\/USBCMDAP.exe 0 0 101 2 5\n/' \
| sed -r 's/<freeStyleBuild><building>false<\/building><result>SUCCESS<\/result><\/freeStyleBuild>/\/cygdrive\/c\/buildLight\/USBCMDAP.exe 0 0 101 2 6\n/' \
| while read CMD; do eval $CMD; echo $CMD; done; \
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment