summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunho Kang <hhstark.kang@samsung.com>2016-10-11 10:56:56 +0900
committerHyunho Kang <hhstark.kang@samsung.com>2016-10-11 17:37:57 -0700
commitf7b0aed194f2181362952cab1900cdd3355d46aa (patch)
tree7562f718a204dc2f71dfc80854a3e9d56a731e8f
parentbfcdfb2fdb0003b1936eabdaeb34e703cee0cfc1 (diff)
downloadlibrua-f7b0aed194f2181362952cab1900cdd3355d46aa.tar.gz
librua-f7b0aed194f2181362952cab1900cdd3355d46aa.tar.bz2
librua-f7b0aed194f2181362952cab1900cdd3355d46aa.zip
Add rua stat db upgrade logic to upgrade script
Change-Id: Ic221fbd6e4f478f4d517517c2a426a82f7f47d63 Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
-rwxr-xr-xscripts/103.rua_upgrade.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/103.rua_upgrade.sh b/scripts/103.rua_upgrade.sh
index 424b6a4..6e401ee 100755
--- a/scripts/103.rua_upgrade.sh
+++ b/scripts/103.rua_upgrade.sh
@@ -9,8 +9,24 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
DB_DIR=/opt/dbspace
DB_RUA=$DB_DIR/.rua.db
+DB_RUA_STAT=$DB_DIR/.rua_stat.db
+
+USR_DB_DIR=/opt/usr/home/owner/.applications/dbspace
+UPGRADE_DB_RUA_STAT=$USR_DB_DIR/.rua_stat.db
# Delete DB & DB journal
rm -rf $DB_RUA
rm -rf $DB_RUA-journal
+# Copy stat DB & DB journal
+cp -rf $DB_RUA_STAT $USR_DB_DIR
+cp -rf $DB_RUA_STAT-journal $USR_DB_DIR
+
+rm -rf $DB_RUA_STAT
+rm -rf $DB_RUA_STAT-journal
+
+chmod 644 $UPGRADE_DB_RUA_STAT
+chmod 644 $UPGRADE_DB_RUA_STAT-journal
+
+chsmack -a User::Home $UPGRADE_DB_RUA_STAT
+chsmack -a User::Home $UPGRADE_DB_RUA_STAT-journal \ No newline at end of file