# limitations under the License.
#
-_working_dir="/opt/media/Downloads/.preinstallWidgets"
-_widget_temp="/opt/share/widget/*";
+_working_dir="/opt/usr/media/Downloads/.preinstallWidgets"
+_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'`
for list in $_wgt_list
do
echo "Install $list"
- return_string=`wrt-installer -il $list`
- if [ "$return_string" != "${return_string/installed/}" ]; then
+ return_string=`wrt-installer -i $list 2>&1 | grep -v plugin`
+ if [ "$return_string" != "${return_string/successful/}" ]; then
echo "$list widget installation success"
rm -rf $list
else
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
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."
fi
}
-if [ ! -d $_working_dir ]; then
- echo "There is no preinstall widget directory - $_working_dir"
+#Plugin installation is temporary code for window SDK
+/usr/bin/wrt-installer -p
+
+RECOVER_WIDGETS=`ls $_temp_widget_path`
+if [ -n "$RECOVER_WIDGETS" ]; then
+ echo "Start Recover"
restore_widget
- exit 1
fi
install_widgets