Check if there is a path. If there is no path, it will be exited.
Otherwise, all files are removed under current directory
It's a critical bug in this script.
Change-Id: Ie3537ead4152f265d97f65e966342183a9dcd1c2
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
fi
CWD=${PWD}
+if ! [ -d $TOTA_UPG_WORK ]; then
+ echo "$(tput setaf 1)$(tput bold)ERROR: There is no $TOTA_UPG_WORK directory. Please input correct path."
+ tput sgr 0
+ exit
+fi
cd $TOTA_UPG_WORK
ls | grep -vE "cfg|data" | xargs rm -rf
cd data