Signed-off-by: Chenxiong Qi cqi@redhat.com
This aims to fix https://pagure.io/fedpkg/issue/118 and https://bugzilla.redhat.com/show_bug.cgi?id=1410300
I assume the lowercase version is for zsh, right? According to https://unix.stackexchange.com/a/14276 the indexing in there starts from 1.
My fault :( it should be 1 for zsh. I'll fix it.
I tested with bash and it seems to work fine. :+1: from me.
Ideally we would just drop the tee from the pipeline, but then it's hard to stream the output to the console and store it in log file at the same time. I'm not sure if the log is actually useful since it only contains stdout and not stderr, but let's keep this PR small and focused.
tee
rebased
Fixed wrong index for zsh. Also added a comment to describe usage of pipestatus.
pipestatus
Looks good to me.
Pull-Request has been merged by cqi
Signed-off-by: Chenxiong Qi cqi@redhat.com