diff options
Diffstat (limited to 'tools/apply-filter')
-rwxr-xr-x | tools/apply-filter | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/apply-filter b/tools/apply-filter index 6d36be4..a1cd79d 100755 --- a/tools/apply-filter +++ b/tools/apply-filter @@ -2,9 +2,10 @@ # Apply a filter command to a set of files filter=$1; shift +trap 'rm -f "$arg.tmp"' EXIT for arg do echo apply-filter "$filter" "$arg" - bash -c "$filter" < "$arg" > "$arg.tmp" + bash -c "set -o pipefail; $filter" < "$arg" > "$arg.tmp" maybe-mv "$arg.tmp" "$arg" done |