Fixes some HTML errors, shell scripts cleaned up
[mailer.git] / DOCS / final-checker.sh
1 #!/bin/sh
2
3 # Shell script to determine how close we are to final release
4 # If one of these values are bigger zero we still have to do something
5 #
6 if ! test -e "modules.php"; then
7   echo "$0: Please execute this script from root directory."
8   exit 1
9 fi
10
11 echo "$0: Analyzing..."
12 echo " - TODOs in PHP..."
13 TODOS_PHP=`find -type f -name "*.php" -exec grep "@TODO" {} \; | grep "@" --count`
14 echo " - TODOs in TPL..."
15 TODOS_TPL=`find -type f -name "*.tpl" -exec grep "@TODO" {} \; | grep "@" --count`
16 echo " - TODOs in XML..."
17 TODOS_XML=`find -type f -name "*.xml" -exec grep "@TODO" {} \; | grep "@" --count`
18 echo " - DEPRECATED in PHP..."
19 DEPRECATED_PHP=`find -type f -name "*.php" -exec grep "@DEPRECATED" {} \; | grep "@" --count`
20 echo " - DEPRECATED in TPL..."
21 DEPRECATED_TPL=`find -type f -name "*.tpl" -exec grep "@DEPRECATED" {} \; | grep "@" --count`
22 echo " - DEPRECATED in XML..."
23 DEPRECATED_XML=`find -type f -name "*.xml" -exec grep "@DEPRECATED" {} \; | grep "@" --count`
24 echo " - global statements..."
25 GLOBALS=`find -type f -name "*.php" -exec grep -Hn "global " {} \; | grep -v "//" | grep -v "phpmailer" --count`
26 echo "$0: Result..."
27 echo "--------------------------------------"
28 echo " - Open TODOs: ${TODOS_PHP}/${TODOS_TPL}/${TODOS_XML}"
29 echo " - Open DEPRECATED: ${DEPRECATED_PHP}/${DEPRECATED_TPL}/${DEPRECATED_XML}"
30 echo " - global statements: ${GLOBALS}"
31 echo "--------------------------------------"
32 echo "$0: Thanks for waiting for the final release 0.2.1-FINAL! :-)"
33 echo
34 exit 0