Modify the file tranfer root path
[platform/core/connectivity/bluetooth-share.git] / packaging / bluetooth-share_upgrade.sh
1 #!/bin/sh
2
3 #------------------------------------------#
4 # bluetooth-share patch for upgrade (2.4 -> 3.0) #
5 #------------------------------------------#
6
7 # Macro
8 UPGRADE_DATA_DIR=/usr/share/upgrade/data/
9 DATA_DIR=/opt/usr/data/bluetooth-share/
10 DB_DIR_24=/opt/usr/dbspace
11 FTP_DIR_24=/opt/share/bt-ftp
12
13 # Remove 2.4 bluetooth db
14 rm $DB_DIR_24/.bluetooth_trasnfer.db
15 rm $DB_DIR_24/.bluetooth_trasnfer.db-journal
16
17 # Remove 2.4 ftp folder
18 rm -rf $FTP_DIR_24
19
20 # Copy the script for creating 3.0 db
21 mkdir -p $DATA_DIR
22
23 cp $UPGRADE_DATA_DIR/init_db.sh $DATA_DIR
24 chmod 755 $DATA_DIR/init_db.sh
25
26 # Remove RO data
27 rm $UPGRADE_DATA_DIR/init_db.sh
28
29 # Make new db
30 $DATA_DIR/init_db.sh
31