No mksquashfs progress bar if stdin is not a terminal

Explicitly documented updated conditional, as "-t" is not a
commonly seen shell test.
This commit is contained in:
Ryan Finnie 2021-02-17 22:15:50 -08:00 committed by Luca Boccassi
parent a0400b2499
commit 8a8e11e5d1
1 changed files with 4 additions and 1 deletions

View File

@ -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