From: Sejun Park Date: Wed, 23 Apr 2025 05:00:14 +0000 (+0900) Subject: migration script name match with rpmSpecName X-Git-Tag: accepted/tizen/unified/20250519.121257~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b19a53bff0c39f9c38e928efce6df7fb3dc80b9a;p=platform%2Fcore%2Fuifw%2Fvoice-control.git migration script name match with rpmSpecName Change-Id: I686e899f14807ab2a8187f2896b7bdf8386212cb --- diff --git a/script/migration/voice-control.sh b/script/migration/voice-control.sh new file mode 100644 index 0000000..9c13b84 --- /dev/null +++ b/script/migration/voice-control.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +###BackupVconfKey: db/voice/vc/engine/default + +source "$UPDATE_EXEC_PATH/common/util.inc" +source "$UPDATE_EXEC_PATH/common/debug.inc" +source "$UPDATE_EXEC_PATH/common/mig_ctl.inc" +source "$UPDATE_EXEC_PATH/common/path_ctl.inc" +source "$UPDATE_EXEC_PATH/common/error_handle.inc" + +function vc_migration() { + log I "VC Migration start" + log I "VC Migration config files" + + local SRC_PATH=$(get_old_rw_path)/usr/home/owner/share/.voice/vc/ + local DST_PATH=$(get_rw_path)/usr/home/owner/share/.voice/vc/ + local SRC_CONF_PATH=$(get_old_rw_path)/usr/home/owner/share/.voice/vc-config.xml + local DST_CONF_PATH=$(get_old_rw_path)/usr/home/owner/share/.voice/ + + if [ ! -e $DST_PATH ]; then + log I "VC Migration set destination path" + mkdir -p -m 0775 $(get_rw_path)/usr/home/owner/share/.voice/vc/ + chsmack -t $(get_rw_path)/usr/home/owner/share/.voice/vc + chsmack -a "User::App::Shared" $(get_rw_path)/usr/home/owner/share/.voice/vc + mkdir -p $(get_rw_path)/usr/home/owner/share/.voice/vc/1.0/engine-info + chsmack -a "User::App::Shared" $(get_rw_path)/usr/home/owner/share/.voice/vc + chsmack -t $(get_rw_path)/usr/home/owner/share/.voice/vc/1.0/engine-info + chsmack -a "User::App::Shared" $(get_rw_path)/usr/home/owner/share/.voice/vc/1.0/engine-info/ + chown -R ui_fw:users $(get_rw_path)/usr/home/owner/share/.voice/vc/ + fi + + if [ ! -e $SRC_PATH ]; then + log E "VC Migration ERROR : No orignal Data" + return + 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 "VC Migration end" +} + +# Trace flag check & enable +if is_trace_enable; then + trace_enable +fi + +mig_init +vc_migration +mig_finish + +exit 0 diff --git a/script/migration/voice_control.sh b/script/migration/voice_control.sh deleted file mode 100644 index 9c13b84..0000000 --- a/script/migration/voice_control.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -###BackupVconfKey: db/voice/vc/engine/default - -source "$UPDATE_EXEC_PATH/common/util.inc" -source "$UPDATE_EXEC_PATH/common/debug.inc" -source "$UPDATE_EXEC_PATH/common/mig_ctl.inc" -source "$UPDATE_EXEC_PATH/common/path_ctl.inc" -source "$UPDATE_EXEC_PATH/common/error_handle.inc" - -function vc_migration() { - log I "VC Migration start" - log I "VC Migration config files" - - local SRC_PATH=$(get_old_rw_path)/usr/home/owner/share/.voice/vc/ - local DST_PATH=$(get_rw_path)/usr/home/owner/share/.voice/vc/ - local SRC_CONF_PATH=$(get_old_rw_path)/usr/home/owner/share/.voice/vc-config.xml - local DST_CONF_PATH=$(get_old_rw_path)/usr/home/owner/share/.voice/ - - if [ ! -e $DST_PATH ]; then - log I "VC Migration set destination path" - mkdir -p -m 0775 $(get_rw_path)/usr/home/owner/share/.voice/vc/ - chsmack -t $(get_rw_path)/usr/home/owner/share/.voice/vc - chsmack -a "User::App::Shared" $(get_rw_path)/usr/home/owner/share/.voice/vc - mkdir -p $(get_rw_path)/usr/home/owner/share/.voice/vc/1.0/engine-info - chsmack -a "User::App::Shared" $(get_rw_path)/usr/home/owner/share/.voice/vc - chsmack -t $(get_rw_path)/usr/home/owner/share/.voice/vc/1.0/engine-info - chsmack -a "User::App::Shared" $(get_rw_path)/usr/home/owner/share/.voice/vc/1.0/engine-info/ - chown -R ui_fw:users $(get_rw_path)/usr/home/owner/share/.voice/vc/ - fi - - if [ ! -e $SRC_PATH ]; then - log E "VC Migration ERROR : No orignal Data" - return - 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 "VC Migration end" -} - -# Trace flag check & enable -if is_trace_enable; then - trace_enable -fi - -mig_init -vc_migration -mig_finish - -exit 0