From 42354e9abfc5c3807543b01221536c083a0f66e6 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Wed, 6 Jan 2016 22:42:58 +0100 Subject: Add pipefail option --- bin/ftpsync | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/ftpsync b/bin/ftpsync index b230823..6b02cbf 100755 --- a/bin/ftpsync +++ b/bin/ftpsync @@ -8,6 +8,11 @@ set -u # the important part here) set -E +# A pipeline's return status is the value of the last (rightmost) +# command to exit with a non-zero status, or zero if all commands exit +# success‐ fully. +set -o pipefail + # ftpsync script for Debian # Based losely on a number of existing scripts, written by an # unknown number of different people over the years. -- cgit v1.2.3