summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunmin Lee <sunm.lee@samsung.com>2016-09-21 14:46:42 +0900
committerSunmin Lee <sunm.lee@samsung.com>2016-09-26 11:10:49 +0900
commit3dd6dd3e5e120200876923ca9a38623ac2779f96 (patch)
tree7fd7a9b96338801434fbff9f05c049f6a088a2f9
parent6dd3013b130a8065333e79ce28c5c86a076b4923 (diff)
downloadsystem-plugin-accepted/tizen/common/20160926.154255.tar.gz
system-plugin-accepted/tizen/common/20160926.154255.tar.bz2
system-plugin-accepted/tizen/common/20160926.154255.zip
At post script: 1) Migrate user contents files to 3.0 path 2) Remove unused files in 3.0 Change-Id: Id30143efa87314ed3dde3a0179aa1e6950e02df0 Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
-rwxr-xr-xupgrade/update-post.sh22
1 files changed, 21 insertions, 1 deletions
diff --git a/upgrade/update-post.sh b/upgrade/update-post.sh
index 696e2d6..11fc065 100755
--- a/upgrade/update-post.sh
+++ b/upgrade/update-post.sh
@@ -1,10 +1,30 @@
#!/bin/sh
#
# RW update post script
-# (especially for filesystem operation)
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin
rm -rf /opt/usr/live
rm -rf /opt/driver
rm -rf /opt/storage
+
+# Migrate user contents to 3.0 path
+. /etc/tizen-platform.conf
+export `tzplatform-get --user $TZ_SYS_DEFAULT_USER TZ_USER_CONTENT`
+CONTENTS24=/opt/usr/media
+CONTENTS30=$TZ_USER_CONTENT
+
+cp -rT --preserve=mode,timestamps $CONTENTS24/DCIM $CONTENTS30/Camera
+cp -rT --preserve=mode,timestamps $CONTENTS24/Documents $CONTENTS30/Documents
+cp -rT --preserve=mode,timestamps $CONTENTS24/Downloads $CONTENTS30/Downloads
+cp -rT --preserve=mode,timestamps $CONTENTS24/Images $CONTENTS30/Images
+cp -rT --preserve=mode,timestamps $CONTENTS24/Music $CONTENTS30/Music
+cp -rT --preserve=mode,timestamps $CONTENTS24/Others $CONTENTS30/Others
+cp -rT --preserve=mode,timestamps $CONTENTS24/Sounds $CONTENTS30/Sounds
+cp -rT --preserve=mode,timestamps $CONTENTS24/Videos $CONTENTS30/Videos
+
+# Remove remain garbage files
+rm -rf /opt/usr/media
+mkdir -m 755 /opt/usr/media
+chsmack -a '_' /opt/usr/media
+rm -rf /opt/home/app