change the src,dst file path for only tts 65/308965/2
authordyamy-lee <dyamy.lee@samsung.com>
Wed, 3 Apr 2024 05:45:51 +0000 (14:45 +0900)
committerdyamy-lee <dyamy.lee@samsung.com>
Wed, 3 Apr 2024 07:07:44 +0000 (16:07 +0900)
/usr/data/.voice directroy can be used with other voice framework.
So, only mv tts directory. And, following that change, rename it.

Change-Id: I28233bd5811e3403a92ee4421d217381f382267c

script/migration/tts.sh

index 5ae1e0f..f951ada 100644 (file)
@@ -12,9 +12,10 @@ source "$UPDATE_EXEC_PATH/common/error_handle.inc"
 function tts_migration() {
     log I "TTS Migration config files"
 
-    local SRC_PATH=$(get_old_rw_path)/usr/data/.voice/
-    local DST_PATH=$(get_rw_path)/usr/data/.voice/
-    local SRC_CONF_PATH=$(get_old_rw_path)/usr/home/owner/share/.voice/tts-config.xml
+    local SRC_PATH=$(get_old_rw_path)/usr/data/.voice/tts
+    local DST_PATH=$(get_rw_path)/usr/data/.voice/tts
+    local SRC_CONF_PATH=$(get_old_rw_path)/usr/data/.voice/tts-config.xml
+    local DST_CONF_PATH=$(get_rw_path)/usr/data/.voice/
 
     if [ ! -e $DST_PATH ]; then
         log I "TTS Migration set destination path"
@@ -28,18 +29,19 @@ function tts_migration() {
         chown -R ui_fw:users $(get_rw_path)/usr/data/.voice
     fi
 
-    if [ -e $SRC_CONF_PATH ]; then
+    if [ -e $SRC_PREV_CONF_PATH ]; then
         log I "TTS Migration 7.0 only START"
-        SRC_PREV_PATH=$(get_old_rw_path)/usr/home/owner/share/.voice/tts/1.0/engine-info
-        DST_ENGINE_PATH=$(get_rw_path)/usr/data/.voice/tts/engine-info
+        SRC_PREV_ENGINE_PATH=$(get_old_rw_path)/usr/home/owner/share/.voice/tts/1.0/engine-info
+        DST_NEW_ENGINE_PATH=$(get_rw_path)/usr/data/.voice/tts/engine-info
+        SRC_PREV_CONF_PATH=$(get_old_rw_path)/usr/home/owner/share/.voice/tts-config.xml
 
-        if [ ! -e $SRC_PREV_PATH ]; then
+        if [ ! -e $SRC_PREV_ENGINE_PATH ]; then
             log E "TTS Migration ERROR : No orignal Data"
             return
         fi
 
-        mig_copy $SRC_PREV_PATH $DST_ENGINE_PATH || error_handle "default_data" $LINENO
-        mig_copy $SRC_CONF_PATH $DST_PATH || error_handle "default_data" $LINENO
+        mig_copy $SRC_PREV_ENGINE_PATH $DST_NEW_ENGINE_PATH || error_handle "default_data" $LINENO
+        mig_copy $SRC_PREV_CONF_PATH $DST_CONF_PATH || error_handle "default_data" $LINENO
 
         chown -R ui_fw:users $(get_rw_path)/usr/data/.voice
         chmod 664 $(get_rw_path)/usr/data/.voice/tts-config.xml
@@ -54,6 +56,7 @@ function tts_migration() {
         fi
 
         mig_copy $SRC_PATH $DST_PATH || error_handle "default_data" $LINENO
+        mig_copy $SRC_CONF_PATH $DST_CONF_PATH || error_handle "default_data" $LINENO
         log I "TTS Migration after 8.0 END"
     fi