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 \;
-
-# 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
if [ -d $2/res/$3 ];then
- #find $2/res/$3/. -type f -iname "*.tpk" -exec cp {} $1/shared/res \;
- cp -rf $2/res/$3/. $1/shared/res/.
+ cp -rf $2/res/$3/. $1/shared/res/.
+ # As Profile specific resources has been copied from shared/res/res/<profile> to shared/res location
+ # So removing all profile specific folders from shared/res/res/
+ WORKDIR=`pwd`
+ cd $1/shared/res/res
+ dirs=(*/)
+ for dir in "${dirs[@]}"
+ do
+ if [[ $dir =~ "mobile" ]] || [[ $dir =~ "wearable" ]] || [[ $dir =~ "common_iot" ]] || [[ $dir =~ "tv" ]]; then
+ # So removing all profile specific folders from shared/res/res/
+ rm -rf $dir
+ fi
+ done
+
+ #if 'res' (/shared/res/res) folder is empty, then remove 'res' folder too.
+ cd ..
+ VALUE=`ls -l res | wc -l`
+ if [ $VALUE == 1 ]; then
+ rm -rf res
+ fi
+ cd $WORKDIR
fi
-
cp scripts_tpk/spec.sh $1/shared/res/.
sed -i -f scripts_tpk/$3.sed $1/inc/tct_common.h