summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-05-15 21:20:41 +0200
committerThomas Bächler <thomas@archlinux.org>2011-05-16 09:29:47 +0200
commit141fd099a6d0b5edfeb33a69c99b5f09014cd2a2 (patch)
tree7d2d1c9a2785014efb58be15ba8aa5d76c594e4f
parent121210bf369e15f66fcc831f2c7c212e1f3858bd (diff)
downloadmkinitcpio-141fd099a6d0b5edfeb33a69c99b5f09014cd2a2.tar.gz
mkinitcpio-141fd099a6d0b5edfeb33a69c99b5f09014cd2a2.tar.xz
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 <dan@archlinux.org>
-rwxr-xr-xmkinitcpio6
1 files changed, 3 insertions, 3 deletions
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