File: 1001_use_Bourne_shell.patch

package info (click to toggle)
librdf-query-perl 2.919-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,580 kB
  • sloc: perl: 30,628; javascript: 131; sh: 13; makefile: 2
file content (39 lines) | stat: -rw-r--r-- 1,043 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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