diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-10-02 00:47:01 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-10-02 02:45:28 -0400 |
commit | e96a68e53ea2c945af30af983c24714e21e0968a (patch) | |
tree | 92403d305376b3737d20aa33e4d58d65cff1bb15 | |
parent | 302c648042ae1d7f8e0e95305dd50a9ed025e7e5 (diff) |
libremakepkg: Tidy funny syntax
I don't know what I was thinking when I wrote it that way.
For one, the "<&0" bit is a no-op. It redirects stdin to be stdin. Maybe
I had meant to write "<&-" and close it?
For two, just write it normally. It's simple enough, don't make it look
like magic.
-rwxr-xr-x | src/chroot-tools/libremakepkg | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index 248eab6..00eb2e0 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -76,9 +76,10 @@ run_hook() { local fails=() for hook in "${!hookvar}"; do - # The "<&0&wait $!" trick is to prevent "||" from + # The "& wait $!" trick is to prevent "||" from # disabling "set -e" - { "$hook" "$@" |& indent; } <&0&wait $! || fails+=("$hook") + { "$hook" "$@" |& indent; } & + wait $! || fails+=("$hook") done if [[ ${#fails[@]} -gt 0 ]]; then |