[poky] [PATCH 31/59] Redirect downloading information to both screen and log file

Liping Ke liping.ke at intel.com
Mon Jan 3 15:47:52 PST 2011


Since now wget output all information to stderr, and we need
to redirect to stdout and then use "tee" to redirect it to
both stdout and logfile.

Signed-off-by: Liping Ke <liping.ke at intel.com>
---
 scripts/adt-installer/yocto_installer |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/adt-installer/yocto_installer b/scripts/adt-installer/yocto_installer
index f7ac2db..39e57fd 100755
--- a/scripts/adt-installer/yocto_installer
+++ b/scripts/adt-installer/yocto_installer
@@ -167,12 +167,12 @@ get_qemu_image()
   fi
 
   echo_info "[ADT_INST] Downloading qemu kernel binary: $qemu_kernel"
-  wget "$YOCTOADT_ROOTFS_LOC/$qemu_kernel" -P $LOCAL_DOWNLOAD &>> $YOCTOADT_INSTALL_LOG_FILE
+  wget "$YOCTOADT_ROOTFS_LOC/$qemu_kernel" -P $LOCAL_DOWNLOAD 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
   check_result
   
   for image_type in $select_rootfs; do
     echo_info "[ADT_INST] Downloading rootfs file: poky-image-$image_type-qemu$1.tar.bz2"
-    wget "$YOCTOADT_ROOTFS_LOC/poky-image-$image_type-qemu$1.tar.bz2" -P $LOCAL_DOWNLOAD &>> $YOCTOADT_INSTALL_LOG_FILE
+    wget "$YOCTOADT_ROOTFS_LOC/poky-image-$image_type-qemu$1.tar.bz2" -P $LOCAL_DOWNLOAD 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE"
     check_result
   done
 }
-- 
1.7.0.4




More information about the poky mailing list