From 32a71b6054a786f2134e9afaa657973366133c44 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 26 Mar 2018 21:49:40 -0400 Subject: parabolaweb-reporead-rsync: Correctly exit with non-zero on error --- parabolaweb-reporead-rsync.in | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/parabolaweb-reporead-rsync.in b/parabolaweb-reporead-rsync.in index d71cb2a..6e3fbaa 100644 --- a/parabolaweb-reporead-rsync.in +++ b/parabolaweb-reporead-rsync.in @@ -1,6 +1,6 @@ #!/bin/bash -e -# Copyright (c) 2012-2013, 2017 Luke Shumaker +# Copyright (c) 2012-2013, 2017-2018 Luke Shumaker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -25,10 +25,8 @@ rsync -v --no-motd -mrtlH --no-p \ --delete-after "$RSYNCSRV" "$RSYNCDIR/" r=0 -find "$RSYNCDIR" -name '*.files.tar.gz' -not -name '.*' | - sed -r 's|.*/([^/]+)/[^/]+$|\1 &|' | - while read -r arch filename; do - echo reporead "$arch" "$filename" - python2 "${WEBDIR}/manage.py" reporead "$arch" "$filename" || r=$? - done +while read -r arch filename; do + echo reporead "$arch" "$filename" + python2 "${WEBDIR}/manage.py" reporead "$arch" "$filename" || r=$? +done <(find "$RSYNCDIR" -name '*.files.tar.gz' -not -name '.*' | sed -r 's|.*/([^/]+)/[^/]+$|\1 &|') exit $r -- cgit v1.2.2