328ac04dc470b84c056ae4378279d3f14ff82039
[platform/core/system/tizen-platform-config.git] / scripts / 799.filesystem-post_24to30.patch.sh
1 #!/bin/sh
2 #
3 # RW update filesystem-post script (2.4 -> 3.0)
4 #
5 PATH=/bin:/usr/bin:/sbin:/usr/sbin
6
7 rm -rf /opt/usr/live
8 rm -rf /opt/driver
9 rm -rf /opt/storage
10
11 # Migrate user contents to 3.0 path
12 . /etc/tizen-platform.conf
13 export `tzplatform-get --user $TZ_SYS_DEFAULT_USER TZ_USER_CONTENT`
14 CONTENTS24=/opt/usr/media
15 CONTENTS30=$TZ_USER_CONTENT
16
17 cp -rT --preserve=mode,timestamps $CONTENTS24/DCIM      $CONTENTS30/Camera
18 cp -rT --preserve=mode,timestamps $CONTENTS24/Documents $CONTENTS30/Documents
19 cp -rT --preserve=mode,timestamps $CONTENTS24/Downloads $CONTENTS30/Downloads
20 cp -rT --preserve=mode,timestamps $CONTENTS24/Images    $CONTENTS30/Images
21 cp -rT --preserve=mode,timestamps $CONTENTS24/Music     $CONTENTS30/Music
22 cp -rT --preserve=mode,timestamps $CONTENTS24/Others    $CONTENTS30/Others
23 cp -rT --preserve=mode,timestamps $CONTENTS24/Sounds    $CONTENTS30/Sounds
24 cp -rT --preserve=mode,timestamps $CONTENTS24/Videos    $CONTENTS30/Videos
25
26 # Remove remain garbage files
27 rm -rf $CONTENTS24
28 mkdir -m 755 $CONTENTS24
29 chsmack -a '_' $CONTENTS24
30 rm -rf /opt/home/app