summaryrefslogtreecommitdiff
path: root/src/chroot-tools/libremakepkg
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-05-01 17:19:22 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-05-04 03:28:40 -0400
commit6d935b88d80181707d6d3821814af5a6c99ffea8 (patch)
treeccf610e7586ea010da53644bd2228870d27fffde /src/chroot-tools/libremakepkg
parent3dd9a5f0de096ae9b7ba47c4907d38ca4c087326 (diff)
bugfix [2/2]: libremakepkg: hooks-distcc: Fix for the basic smoke test.
Diffstat (limited to 'src/chroot-tools/libremakepkg')
-rwxr-xr-xsrc/chroot-tools/libremakepkg10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg
index 5b86c03..cd9e60e 100755
--- a/src/chroot-tools/libremakepkg
+++ b/src/chroot-tools/libremakepkg
@@ -69,14 +69,16 @@ exit_copy() {
}
# Usage; run_hook $hookname $args...
-run_hook() (
+run_hook() {
local hookname=$1; shift
local hookvar="hook_${hookname}[@]"
local fails=()
- set -o pipefail
+
for hook in "${!hookvar}"; do
- { "$hook" "$@" |& indent; } || fails+=("$hook")
+ # The "<&0&wait $!" trick is to prevent "||" from
+ # disabling "set -e"
+ { "$hook" "$@" |& indent; } <&0&wait $! || fails+=("$hook")
done
if [[ ${#fails[@]} -gt 0 ]]; then
@@ -85,7 +87,7 @@ run_hook() (
else
return 0
fi
-)
+}
# Usage: add_to_local_repo $copydir $pkgfiles...
add_to_local_repo() {