--- a/examples/eg-24-prov-o-html-examples/rdf/create/check-with-cwm.bash Mon Jul 02 21:57:28 2012 +0100
+++ b/examples/eg-24-prov-o-html-examples/rdf/create/check-with-cwm.bash Mon Jul 02 22:14:25 2012 +0100
@@ -1,2 +1,17 @@
#!/bin/bash
-for f in $(find . -name *ttl) ; do cwm $f > /dev/null || echo -------------- ; done
+
+set -e
+
+# Check if cwm is installed
+cwm < /dev/null > /dev/null || {
+ echo "Try:
+ sudo apt-get install cwm
+or install from:
+ http://www.w3.org/2000/10/swap/doc/cwm.html" >&2 ; exit
+}
+
+# Check each file with cwm, echo filename if OK
+# cwm will output any errors to stderr otherwise
+for f in $(find rdf -name '*ttl') ; do
+ cwm $f > /dev/null && echo $f
+done