From 141fd099a6d0b5edfeb33a69c99b5f09014cd2a2 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 15 May 2011 14:20:41 -0500 Subject: Don't print success/failure result on same line Doing the `echo -n` call causes the shell to line-buffer the output anyway, meaning one doesn't see the first part until 'SUCCESS' or 'FAILURE' is printed. This means the last message on the screen is 'Generating module dependencies' when in fact we are actually generating the image, which can take a lot of time when XZ, etc. are used. Print the status on two lines, ensuring buffering is not causing problems with out output. Signed-off-by: Dan McGee --- mkinitcpio | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mkinitcpio') diff --git a/mkinitcpio b/mkinitcpio index 31145d0..0ebf7c9 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -282,14 +282,14 @@ fi status=0 if [ -n "${GENIMG}" ]; then - echo -n ":: Generating image '${GENIMG}'..." + echo ":: Generating image '${GENIMG}'" shopt -s -o pipefail [ ${COMPRESSION} = "xz" ] && COMPRESSION_OPTIONS="${COMPRESSION_OPTIONS} --check=crc32" if ! /sbin/gen_init_cpio ${FILELIST} | ${COMPRESSION} ${COMPRESSION_OPTIONS} > "${GENIMG}"; then - echo "FAILED" + echo ":: Image generation FAILED" status=1 else - echo "SUCCESS" + echo ":: Image generation successful" status=0 fi -- cgit v1.2.3-24-g4f1b