From: Thérèse Godefroy Date: Tue, 19 Aug 2014 13:55:34 +0000 (+0200) Subject: fr: fix a few bugs. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a3e0c9477affee00976b464155554783e1b403f4;p=enc-live.git fr: fix a few bugs. --- diff --git a/fr/kitchen/assemble-all-pages b/fr/kitchen/assemble-all-pages index 702aced..7cfdb81 100755 --- a/fr/kitchen/assemble-all-pages +++ b/fr/kitchen/assemble-all-pages @@ -5,7 +5,7 @@ ## Synopsis: assemble-all-pages -## Overview +## Description # Each page is built from a template and one or several includes, as usual; # in addition, several versions of a page can be built from a single @@ -44,17 +44,18 @@ # =========================================================================== set -e +set -o pipefail -close_term () { +function close_term () { printf '\n%s' '*** Close the terminal window or press Return.'; read OK test -z "$OK" && exit $1 } # Create temporary files. -names=$(mktemp -t aap.XXXXXX) || close_or_exit 1 -list=$(mktemp -t aap.XXXXXX) || close_or_exit 1 -before=$(mktemp -t aap.XXXXXX) || close_or_exit 1 -after=$(mktemp -t aap.XXXXXX) || close_or_exit 1 +names=$(mktemp -t aap.XXXXXX) || close_term 1 +list=$(mktemp -t aap.XXXXXX) || close_term 1 +before=$(mktemp -t aap.XXXXXX) || close_term 1 +after=$(mktemp -t aap.XXXXXX) || close_term 1 trap 'rm -f "$names" "$list" "$before" "$after"' EXIT # List all the templates in the working directory. @@ -80,7 +81,7 @@ while read name; do if [ -f "$include" ]; then cat $before $include $after > ../$name.html else - echo "$include is missing." && exit 1 + echo "$include is missing." && close_term 1 fi sed -i "/^