3 # * Copyright (c) 2000 - 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.
19 DBFILE="/opt/dbspace/.shortcut_service.db"
46 "livebox_shortcut_type"
47 "livebox_shortcut_type"
48 "livebox_shortcut_type"
49 "livebox_shortcut_type"
50 "livebox_shortcut_type"
65 sqlite3 $DBFILE "CREATE TABLE shortcut_service (id INTEGER PRIMARY KEY AUTOINCREMENT, appid TEXT, icon TEXT, name TEXT, extra_key TEXT, extra_data TEXT)"
66 sqlite3 $DBFILE "CREATE TABLE shortcut_name (id INTEGER, lang TEXT, name TEXT)"
67 while [ $CNT -lt $MAX ]
69 echo "Insert a new record ('${APPID[$CNT]}', '${ICON[$CNT]}', '${NAME[$CNT]}', \"${KEY[$CNT]}\", \"${VALUE[$CNT]}\")"
70 sqlite3 $DBFILE "INSERT INTO shortcut_service (appid, icon, name, extra_key, extra_data) VALUES ('${APPID[$CNT]}', '${ICON[$CNT]}', \"${NAME[$CNT]}\", \"${KEY[$CNT]}\", \"${VALUE[$CNT]}\")" 2>/dev/null
74 ID=`sqlite3 $DBFILE "SELECT id FROM shortcut_service WHERE appid = \"${APPID[$CNT]}\" AND extra_key = \"${KEY[$CNT]}\" AND extra_data = \"${VALUE[$CNT]}\""`
75 echo "Insert a name: \"${NAME[$CNT]}\""
76 sqlite3 $DBFILE "INSERT INTO shortcut_name (id, lang, name) VALUES ('$ID', 'en-us', \"${NAME[CNT]}\")"
80 echo "Error/Total: $ERR/$CNT"