Description: rewrite tcsh scripts in Bourne shell
Author: Jonas Smedegaard <dr@jones.dk>
Last-Change: 2024-04-12
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/bin/failing_earl_tests.sh
+++ b/bin/failing_earl_tests.sh
@@ -1,7 +1,9 @@
-#!/bin/tcsh
+#!/bin/sh
 
-foreach i (earl*.ttl)
-if (-e $i) then
+set -e
+
+for i in earl*.ttl; do
+if [ -e "$i" ]; then
 roqet -q -e "PREFIX earl: <http://www.w3.org/ns/earl#> SELECT ?test FROM <${i}> WHERE { [ earl:test ?test ; earl:result [ earl:outcome earl:failed ] ] } ORDER BY ?test" | cut -d '<' -f 2 | cut -d '>' -f 1
-endif
-end
+fi
+done
--- a/bin/passing_earl_tests.sh
+++ b/bin/passing_earl_tests.sh
@@ -1,7 +1,9 @@
-#!/bin/tcsh
+#!/bin/sh
 
-foreach i (earl*.ttl)
-if (-e $i) then
+set -e
+
+for i in earl*.ttl; do
+if [ -e "$i" ]; then
 roqet -q -e "PREFIX earl: <http://www.w3.org/ns/earl#> SELECT ?test FROM <${i}> WHERE { [ earl:test ?test ; earl:result [ earl:outcome earl:passed ] ] } ORDER BY ?test" | cut -d '<' -f 2 | cut -d '>' -f 1
-endif
-end
+fi
+done
