}
# 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.
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 "/^<!-- include virtual=\"$include\"/d" ../$name.html
done < $list