Upgrade: Add post operations 96/88896/6 accepted/tizen/3.0/ivi/20161011.065124 accepted/tizen/3.0/mobile/20161015.034150 accepted/tizen/3.0/tv/20161016.005621 accepted/tizen/3.0/wearable/20161015.084449 accepted/tizen/common/20160926.154255 accepted/tizen/ivi/20160927.020734 accepted/tizen/mobile/20160927.021101 accepted/tizen/tv/20160927.021040 accepted/tizen/wearable/20160927.021050 submit/tizen/20160926.074333 submit/tizen_3.0_ivi/20161010.000007 submit/tizen_3.0_mobile/20161015.000006 submit/tizen_3.0_tv/20161015.000005 submit/tizen_3.0_wearable/20161015.000006
authorSunmin Lee <sunm.lee@samsung.com>
Wed, 21 Sep 2016 05:46:42 +0000 (14:46 +0900)
committerSunmin Lee <sunm.lee@samsung.com>
Mon, 26 Sep 2016 02:10:49 +0000 (11:10 +0900)
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>
upgrade/update-post.sh

index 696e2d65e72a2233800afade20466cc6e3591d4a..11fc0652c5248e80338618271933c53e64674273 100755 (executable)
@@ -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