X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=etc%2Fwrt_preinstall_widgets.sh;h=61935a38cec34366bafd34ae190201c40865b646;hb=5d6852dcd1b5681462c8d2f4eb8a14c9ba2a9b78;hp=218015df8efe3c94bf19c2144b26897c165f11dc;hpb=e0996dfc202b2dc26189aea0b018672796373bb4;p=platform%2Fframework%2Fweb%2Fwrt-installer.git diff --git a/etc/wrt_preinstall_widgets.sh b/etc/wrt_preinstall_widgets.sh index 218015d..61935a3 100755 --- a/etc/wrt_preinstall_widgets.sh +++ b/etc/wrt_preinstall_widgets.sh @@ -15,7 +15,10 @@ # _working_dir="/opt/usr/media/Downloads/.preinstallWidgets" -_widget_temp="/opt/share/widget/*"; +_widget_temp="/opt/share/widget/*" + +#Reinstall widget during booting +_temp_widget_path="/opt/share/widget/temp_info" install_widgets() { _wgt_list=`find $_working_dir -name '*.wgt'` @@ -47,10 +50,6 @@ for file in $_widget_temp; do fi done - -#Reinstall widget during booting -_temp_widget_path=/opt/share/widget/temp_info - FILE_LIST=`ls $_temp_widget_path` if [ -n "$FILE_LIST" ]; then @@ -60,9 +59,8 @@ if [ -n "$FILE_LIST" ]; then line=`cat $FILE_NAME` echo "----------------------------------------------------------------" echo "UnInstalling widget : $line ..." - wrt-installer -up $line - echo "Installing widget : $line ..." - wrt-installer -i $line + return_string=`wrt-installer -up $line 2>&1 | grep -v plugin` + echo "Result $return_string" done else echo "There is no reinstall widget." @@ -72,10 +70,10 @@ fi #Plugin installation is temporary code for window SDK /usr/bin/wrt-installer -p -if [ ! -d $_working_dir ]; then - echo "There is no preinstall widget directory - $_working_dir" +RECOVER_WIDGETS=`ls $_temp_widget_path` +if [ -n "$RECOVER_WIDGETS" ]; then + echo "Start Recover" restore_widget - exit 1 fi install_widgets