Add upgrade script
[platform/core/uifw/stt.git] / 500.stt_upgrade_24to30.sh
1 #!/bin/sh
2
3 #------------------------------------------#
4 # Resourced patch for upgrade (2.4 -> 3.0) #
5 #------------------------------------------#
6
7 # Macro
8 VOICE_DIR_24=/opt/usr/data/voice
9 STT_CONF_DIR_24=/opt/home/app/.voice
10 STT_CONF_FILE_24=$STT_CONF_DIR_24/stt-config.xml
11
12 VOICE_DIR_30=/opt/usr/home/owner/share/.voice
13 STT_CONF_FILE_30=$VOICE_DIR_30/stt-config.xml
14
15 # Make new directories
16 mkdir -p $VOICE_DIR_30
17 chown owner:users $VOICE_DIR_30
18 chsmack -a User::App::Shared $VOICE_DIR_30
19
20
21 # Move
22 mv $VOICE_DIR_24/stt/ $VOICE_DIR_30/
23 chown -R owner:users $VOICE_DIR_30/
24 chsmack -ra User::App::Shared $VOICE_DIR_30/
25
26 mv $STT_CONF_FILE_24 $STT_CONF_FILE_30
27 chown owner:users $STT_CONF_FILE_30
28 chsmack -a User::App::Shared $STT_CONF_FILE_30
29
30 # Remove directories
31 rm -r /opt/usr/devel/bin/stt-test
32 rm -rf $VOICE_DIR_24/stt