Add caution text for gbs build
authorJihoon Jung <jh8801.jung@samsung.com>
Thu, 11 Mar 2021 06:51:43 +0000 (15:51 +0900)
committer정지훈/Tizen Platform Lab(SR)/Staff Engineer/삼성전자 <jh8801.jung@samsung.com>
Mon, 15 Mar 2021 22:46:33 +0000 (07:46 +0900)
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
packaging/tizen_fix/tizen_fix.sh

index b2dfc40..4066467 100755 (executable)
@@ -5,6 +5,30 @@ FILE1="BUILD.gn"
 FILE2="src/crypto/crypto.gni"
 FILE3="src/platform/Linux/MdnsImpl.cpp"
 
+cd $DST_PATH
+
+while true; do
+    echo -e "\e[31m***********************************\e[0m"
+    echo -e "\e[31m********** C A U T I O N **********\e[0m"
+    echo -e "\e[31m***********************************\e[0m"
+    echo -e "\e[31m This script is a program that downloads the code of CHIP upstream and enables tizen gbs build.\e[0m"
+    echo -e "\e[31m This script contains the contents of deleting all files from CHIP folder (except packaging, git folders)! We ask for safety in use.\e[0m"
+    echo -e "\e[31m Please do not change the location of this script.\e[0m"
+    echo -e "\e[31m Please check if the path of CHIP folder below is correct. \e[0m"
+    echo -e "\e[32m CHIP folder path : $PWD\e[0m"
+    read -p "Do you wish to delete files of the folder? (Y/N) : " yn
+    case $yn in
+        [Yy]* ) break;;
+        [Nn]* ) exit;;
+        * ) echo "Please answer yes or no.";;
+    esac
+done
+
+
+rm -rf `ls | find ./ ! \( \( -path './packaging' -o -path './.git' -o -path './' \) -prune \)`
+
+cd -
+
 git clone https://github.com/project-chip/connectedhomeip
 cd connectedhomeip
 git submodule update --init