diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-03-26 21:49:40 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-03-26 21:51:04 -0400 |
commit | 32a71b6054a786f2134e9afaa657973366133c44 (patch) | |
tree | a21b381b6708912d300992ad8eef901bf62051ca | |
parent | d49c806b59a271d04a93273c2cf0ae74a402b1c2 (diff) |
parabolaweb-reporead-rsync: Correctly exit with non-zero on error
-rw-r--r-- | parabolaweb-reporead-rsync.in | 12 |
1 files 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 <lukeshu@sbcglobal.net> +# Copyright (c) 2012-2013, 2017-2018 Luke Shumaker <lukeshu@sbcglobal.net> # # 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 |