From 49e56442be33c20ebb5d1bef9419ad5082cd0aa7 Mon Sep 17 00:00:00 2001 From: Shobhit Verma Date: Mon, 22 Aug 2016 19:17:07 +0530 Subject: [PATCH] [TCT][TPK Scripts][NONACR][fixed scripts for dali-adaptor build fail and resource copy] Change-Id: I51d414b97993c5a451b1d236946a4be081bb8b7b Signed-off-by: Shobhit Verma --- scripts_tpk/tpk_create.sh | 59 +++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/scripts_tpk/tpk_create.sh b/scripts_tpk/tpk_create.sh index cf80304..1f0e97f 100755 --- a/scripts_tpk/tpk_create.sh +++ b/scripts_tpk/tpk_create.sh @@ -79,36 +79,36 @@ deploySourceFile() { fi - while read line - #Copy c/cpp files as per entry in CMakeFile for common files + + while read line do - if ! [[ $lastline =~ $macro ]]; then + if ! [[ $lastline =~ "MOBILE" ]] && ! [[ $lastline =~ "WEARABLE" ]]; then if [[ $line =~ "SET(TC_SOURCES" || $line =~ "GLOB TC_SOURCES" ]]; then while true do read srcFile substring=$(echo $srcFile | tail -c 3) - if [ "$substring" == ".c" ]; then - cp $2/$srcFile $1/src/. - fi - substring=$(echo $srcFile | tail -c 5) - if [ "$substring" == ".cpp" ]; then - cp $2/$srcFile $1/src/. - fi + if [ "$substring" == ".c" ]; then + cp $2/$srcFile $1/src/. + fi + substring=$(echo $srcFile | tail -c 5) + if [ "$substring" == ".cpp" ]; then + cp $2/$srcFile $1/src/. + fi - substring=$(echo $srcFile | tail -c 2) - if [ "$substring" == ")" ]; then - chCount=${#srcFile} - chCount=$((chCount-1)) - substring=$(echo $srcFile | head -c $chCount) - cp $2/$substring $1/src/. - copy_native_core $1 $2 $5 - break - elif [[ $srcFile == ")" ]]; then - copy_native_core $1 $2 $5 - break - fi + substring=$(echo $srcFile | tail -c 2) + if [ "$substring" == ")" ]; then + chCount=${#srcFile} + chCount=$((chCount-1)) + substring=$(echo $srcFile | head -c $chCount) + cp $2/$substring $1/src/. + copy_native_core $1 $2 $5 + break + elif [[ $srcFile == ")" ]]; then + copy_native_core $1 $2 $5 + break + fi done fi @@ -142,11 +142,16 @@ deploySourceFile() { done < $2/CMakeLists.txt # copying data and shared data - find $2/. -type f ! -iname "*.c" ! -iname "*.cpp" ! -iname "*.h" ! -iname "*.tpk" ! -iname "CMakeLists.txt" -exec cp {} $1/shared/res \; +# find $2/. -type f ! -iname "*.c" ! -iname "*.cpp" ! -iname "*.h" ! -iname "*.tpk" ! -iname "CMakeLists.txt" -exec cp {} $1/shared/res \; - if [ -d $2/res/$3 ];then - find $2/res/$3/. -type f -iname "*.tpk" -exec cp {} $1/shared/res \; - fi +# if [ -d $2/res/$3 ];then +# find $2/res/$3/. -type f -iname "*.tpk" -exec cp {} $1/shared/res \; +# fi + + WORKDIR=`pwd` + cd $2 + find . -type f ! -iname "*.c" ! -iname "*.cpp" ! -iname "*.h" ! -iname "CMakeLists.txt" -exec cp -p --parents {} $1/shared/res/. ";" + cd $WORKDIR cp scripts_tpk/spec.sh $1/shared/res/. @@ -241,7 +246,7 @@ deploySourceFile() { fi fi - + #Change in xml file for specific modules if [ $MODULE_NAME == "accounts-svc" ]; then if [ "$5" == "utc" ]; then -- 2.7.4