From 8a8e11e5d1c747890e1f63c4e821974851c22314 Mon Sep 17 00:00:00 2001 From: Ryan Finnie Date: Wed, 17 Feb 2021 22:15:50 -0800 Subject: No mksquashfs progress bar if stdin is not a terminal Explicitly documented updated conditional, as "-t" is not a commonly seen shell test. --- scripts/build/binary_rootfs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/build/binary_rootfs b/scripts/build/binary_rootfs index 78fe6633e..354fc8d87 100755 --- a/scripts/build/binary_rootfs +++ b/scripts/build/binary_rootfs @@ -265,7 +265,10 @@ case "${LB_CHROOT_FILESYSTEM}" in # Remove stale squashfs image rm -f chroot/filesystem.squashfs - if [ "${_QUIET}" = "true" ] + # Do not display progress bar if: + # - Run with --quiet, or + # - stdin is not a terminal (e.g. in CI, cron, etc) + if [ "${_QUIET}" = "true" ] || [ ! -t 0 ] then MKSQUASHFS_OPTIONS="-no-progress ${MKSQUASHFS_OPTIONS}" fi -- cgit v1.2.3