3 # Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
20 trap 'echo "Script failed"; exit 1' ERR
22 WRT_DB=/opt/dbspace/.wrt.db
23 WRT_DB_BCK=/tmp/wrt.db_backup
24 WIDGET_INSTALL_PATH=/opt/usr/apps
29 cp $WRT_DB $WRT_DB_BCK
30 wrt_commons_create_clean_db.sh
33 INS_ALL_WIDGETEXT="insert into WidgetExtendedInfo(app_id, installed_path)"
34 INS_ALL_WIDGET="insert into WidgetInfo(app_id, tizen_appid)"
35 INS_ALL_ICON="insert into WidgetIcon(icon_id, app_id, icon_src, icon_width, icon_height)"
36 INS_ALL_LOCALIZED_START_FILE="insert into WidgetLocalizedStartFile(app_id, start_file_id, widget_locale, type, encoding)"
37 INS_ALL_START_FILE="insert into WidgetStartFile(start_file_id, app_id, src)"
39 sqlite3 $WRT_DB "${INS_ALL_WIDGET} VALUES(1, 'tizenid201')";
40 sqlite3 $WRT_DB "${INS_ALL_WIDGET} VALUES(2, 'tizenid202')";
41 sqlite3 $WRT_DB "${INS_ALL_WIDGETEXT} VALUES(1, '/opt/share/widget/tests/localization/widget1')";
42 sqlite3 $WRT_DB "${INS_ALL_WIDGETEXT} VALUES(2, '/opt/share/widget/tests/localization/widget2')";
43 sqlite3 $WRT_DB "${INS_ALL_ICON} VALUES(1,1,'icon',251,250)";
44 sqlite3 $WRT_DB "${INS_ALL_ICON} VALUES(2,1,'icon2',253,252)";
45 sqlite3 $WRT_DB "${INS_ALL_LOCALIZED_START_FILE} VALUES(1,2,'en-en','test','test')";
46 sqlite3 $WRT_DB "${INS_ALL_START_FILE} VALUES(2,1,'start_file')";
51 cp $WRT_DB_BCK $WRT_DB