[poky] [PATCH 16/59] Remove redundant prompts
Liping Ke
liping.ke at intel.com
Wed Dec 22 15:37:02 PST 2010
Signed-off-by: Liping Ke <liping.ke at intel.com>
---
scripts/adt-installer/yocto_installer | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/scripts/adt-installer/yocto_installer b/scripts/adt-installer/yocto_installer
index 2038ecd..0e35576 100755
--- a/scripts/adt-installer/yocto_installer
+++ b/scripts/adt-installer/yocto_installer
@@ -167,14 +167,25 @@ fi
confirm_download()
{
+
+#avoid repeated reminding
+if [ "$override_oldfile" == 1 ]; then
+ return $pre_result
+else
+ override_oldfile=1
+fi
+
while true; do
- echo_info "[ADT_INST] File [ $1 ] to be downloaded already exists."
- echo_info "[ADT_INST] Do you want to continue downloading? If yes, old file will be removed. Please enter Y/N:"
+ echo_info "[ADT_INST] Files [$1] already exists. If you continue downloading, old files will be overrided."
+ echo_info "[ADT_INST] Further prompts will not be given if there're more existing files to be downloaded."
+ echo_info "[ADT_INST] Do you want to continue downloading? Please enter Y/N:"
read YOCTOADT_INSTALL
YOCTOADT_INSTALL=`tr '[a-z]' '[A-Z]'<<<"$YOCTOADT_INSTALL"`
if [ "$YOCTOADT_INSTALL" == "Y" ]; then
+ pre_result=0
return 0
elif [ "$YOCTOADT_INSTALL" == "N" ]; then
+ pre_result=1
return 1
fi
done
@@ -234,7 +245,7 @@ download_images()
select_sysroot=`eval echo $select_sysroot_var`
echo_info "\n############################################################################"
- echo_info "# Please confirm below installation configurations from yocto_installer.conf"
+ echo_info "# To be downloaded rootfs image details defined in yocto_installer.conf"
echo_info "############################################################################"
echo_info "# Target architecture:\t\t$1"
echo_info "# Root_fs images:\t\t$select_rootfs"
@@ -242,9 +253,6 @@ download_images()
echo_info "# Target sysroot dir:\t\t$select_sysroot"
echo_info "############################################################################\n"
- confirm_install
-
-
get_qemu_image $1 $select_rootfs
fi
}
@@ -305,6 +313,7 @@ if [ ! -d "$LOCAL_DOWNLOAD" ]; then
fi
#downloading required qemu images/rootfs
+override_oldfile=0
for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
download_images $arch_type
done
--
1.7.0.4
More information about the poky
mailing list