summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-11-27 23:47:44 +0100
committerJonas Smedegaard <dr@jones.dk>2017-11-27 23:47:44 +0100
commitd7a557b1f8aafdf4f053685464bfe12f7a35a03c (patch)
tree982b40fffa5abaa96ffa992a0e10bcdad2a31953
parent1bba7d36e8015889d11181a6546237e8c5562b06 (diff)
Fix fail on subshell error.
-rwxr-xr-xfoaf/mkfoaf.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/foaf/mkfoaf.sh b/foaf/mkfoaf.sh
index 81d3bac..d25d8e2 100755
--- a/foaf/mkfoaf.sh
+++ b/foaf/mkfoaf.sh
@@ -14,6 +14,7 @@ bindir=$(dirname "$0")
xsltdir="$bindir"
turtle2foaf() {
+ set -e
inpath="$1"
outpath="$2"
[ -n "$outpath" ] || outpath=$(echo "$inpath" | perl -pe 's/\.ttl$/.rdf/ or exit 1') || exit1 "Failed resolving output RDF file from input Turtle file \"$inpath\"."
@@ -27,6 +28,7 @@ turtle2foaf() {
}
linkedin2foaf() {
+ set -e
inpath="$1"
outpath="$2"
[ -n "$outpath" ] || outfile=index.rdf && outpath="$(dirname "$inpath")/linkedin/$outfile"
@@ -56,6 +58,7 @@ linkedin2foaf() {
}
tidyfacebookfoaf() {
+ set -e
inpath="$1"
outpath="$2"
@@ -66,6 +69,7 @@ tidyfacebookfoaf() {
}
foafsign() {
+ set -e
inpath="$1"
outpath="${inpath}_sig.pgp"
gpg -a -o- --detach-sign "$inpath" > "$outpath"