It seems that some bash versions cannot handle very long '&&' lists. So in this case, just use 'set -e' to abort on error.
Signed-off-by: Michael Olbrich <[email protected]> --- Hi, So I ended up with just using 'set -e'. The other stuff is a bit more complex and I need to figure out what exactly I want to do here. Does this work for you? Michael scripts/lib/ptxd_lib_dopermissions.awk | 13 +++++++++---- scripts/lib/ptxd_make_image_prepare_work_dir.sh | 1 - 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/lib/ptxd_lib_dopermissions.awk b/scripts/lib/ptxd_lib_dopermissions.awk index b0aefe1b7a18..bef1823317c5 100755 --- a/scripts/lib/ptxd_lib_dopermissions.awk +++ b/scripts/lib/ptxd_lib_dopermissions.awk @@ -2,18 +2,23 @@ BEGIN { FS = "\x1F"; + print("set -e") } $1 ~ "f" { - printf("chmod %s '.%s' &&\n" \ - "chown %s.%s '.%s' &&\n", \ + printf("chmod %s '.%s'\n" \ + "chown %s.%s '.%s'\n", \ $5, $2, $3, $4, $2); } $1 ~ "n" { printf("if [ ! \\( -b '.%s' -o -c '.%s' -o -p '.%s' \\) ]; then " \ - " mknod -m %s '.%s' %s %s %s &&\n" \ + " mknod -m %s '.%s' %s %s %s\n" \ " chown %s.%s '.%s'\n" \ - "fi &&\n", \ + "fi\n", \ $2, $2, $2, $5, $2, $6, $7, $8, $3, $4, $2); } + +END { + print("set +e") +} diff --git a/scripts/lib/ptxd_make_image_prepare_work_dir.sh b/scripts/lib/ptxd_make_image_prepare_work_dir.sh index 8b08397653ab..adbf7797c1b4 100644 --- a/scripts/lib/ptxd_make_image_prepare_work_dir.sh +++ b/scripts/lib/ptxd_make_image_prepare_work_dir.sh @@ -52,7 +52,6 @@ ${list[*]} { echo "cd '${work_dir}' || exit" ptxd_dopermissions "${ptxd_reply_perm_files[@]}" - echo ":" } | sh && check_pipe_status && -- 2.20.1 _______________________________________________ ptxdist mailing list [email protected] To unsubscribe, send a mail with subject "unsubscribe" to [email protected]
