--- /dev/null
+#!/bin/bash
+
+####################### Check Command #######################
+if ! type "tcc.py" > /dev/null 2>&1; then
+ echo -e "Error!";
+ echo -e "The command(tcc.py) is not found!
+ Please install the tcc.py and set up on the PATH
+ e.g - export PATH=\$PATH:\${TCC_PATH} or
+ cp tcc.py /usr/local/bin"
+ exit 1;
+fi
+
+if ! type "checkpatchinit_tizen.sh" > /dev/null 2>&1; then
+ echo -e "Error!";
+ echo -e "The command(checkpatchinit_tizen.sh) is not found!
+ Please install the checkpatchinit_tizen.sh and set up on the PATH
+ e.g - export PATH=\$PATH:\${CHECK_PATCH_INIT_TIZEN_PATH} or
+ cp checkpatchinit_tizen.sh /usr/local/bin
+ cp checkpatch_tizen.pl /usr/local/bin";
+ exit 1;
+fi
+
+if ! type "aspell" > /dev/null 2>&1; then
+ echo -e "Error!";
+ echo -e "The command(aspell) is not found!
+ Please install the aspell
+ e.g - sudo apt-get install aspell aspell-en";
+ exit 1;
+fi
+
+
+root_dir=`git rev-parse --show-toplevel`
+
+
+####################### Check tcc.py #######################
+template_dir=$TEMPLATE_DIR
+
+if [ ! -d "${template_dir}" ]
+then
+ echo -e "Error!";
+ echo -e "The template path is not directory! [${template_dir}]
+ Please set up the template path on the '\$TEMPLATE_DIR'";
+ exit 1;
+fi
+
+echo -e "Compared directory with
+[${template_dir}:${root_dir}]";
+
+echo -e ">>>>>>>>>>>>>>>>>>>> Run tcc.py";
+
+tcc_msg=$(tcc.py ${template_dir} ${root_dir});
+if [ $? -ne 0 ]
+then
+ echo -e "Error!";
+ echo -e "The compared directory is not correct!";
+ echo -e "${tcc_msg}";
+ exit 1;
+fi
+echo -e ">>>>>>>>>>>>>>>>>>>> Done";
+echo -e "";
+
+####################### Check checkpatchinit_tizen.sh #######################
+echo -e ">>>>>>>>>>>>>>>>>>>> Run checkpatchinit_tizen.sh";
+error_count=$(checkpatchinit_tizen.sh ${root_dir} | grep "ERROR" -c);
+if [ "$error_count" -ne 0 ]
+then
+ echo -e "Error!
+ The below codes wasn't observed for a Tizen Coding Rule!
+ Please review again!";
+ checkpatchinit_tizen.sh ${root_dir} | grep "ERROR" --color=auto;
+ exit 1;
+fi
+echo -e ">>>>>>>>>>>>>>>>>>>> Done";
+echo -e "";
+
+####################### Check spell #######################
+
+find . -type f \( ! -path '*.git*' \
+ ! -path '*.sign*' \
+ ! -path '*Debug*' \
+ ! -path '*Release*' \
+ ! -name '*dic.dat' \
+ ! -name '.*' \
+ ! -name '*.png' \
+ ! -name '*.jpg' \
+ ! -name '*files.tmp' \) > .files.tmp
+
+echo -e ">>>>>>>>>>>>>>>>>>>> Run spell";
+while read file; do
+
+ mode="none"
+
+ [[ $file == *.xml ]] && mode="sgml"
+ [[ $file == *.h ]] && mode="ccpp"
+ [[ $file == *.c ]] && mode="ccpp"
+ [[ $file == *.cpp ]] && mode="ccpp"
+ [[ $file == *.js ]] && mode="ccpp"
+ [[ $file == *.html ]] && mode="html"
+
+ if [[ $mode == none ]]
+ then
+ result_aspell="$(aspell list <$file)"
+ else
+ result_aspell="$(aspell list --mode=$mode <$file)"
+ fi
+
+ result_aspell_count="$(echo $result_aspell | wc -w)"
+
+ echo "Proceess ${file} - [${result_aspell_count}]";
+ if [ $result_aspell_count -ne 0 ]
+ then
+ echo -e "Error!"
+ echo -e "Misspelled words detected!";
+ for word in $result_aspell
+ do
+ echo -e "$file : $word"
+ done
+ exit 1;
+ fi
+
+done < .files.tmp
+
+rm .files.tmp
+
+echo -e ">>>>>>>>>>>>>>>>>>>> Done";
+echo -e "";
+exit 0;