X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=contrib%2Ffinal-checker.sh;fp=contrib%2Ffinal-checker.sh;h=8fdd3ff192259f33f4f50fc3f1a7d0ef0eb86508;hp=0000000000000000000000000000000000000000;hb=6297478ce1c3127044dbf1e72194c6ccee14f9ea;hpb=990637896e9b72d7fa45cfb52f854a8775ab5871 diff --git a/contrib/final-checker.sh b/contrib/final-checker.sh new file mode 100755 index 0000000000..8fdd3ff192 --- /dev/null +++ b/contrib/final-checker.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +# Shell script to determine how close we are to final release +# If one of these values are bigger zero we still have to do something + +if ! test -e "modules.php"; then + echo "$0: Please execute this script from root directory." + exit 1 +fi + +echo "$0: Analyzing..." +echo " - TODOs in PHP..." +TODOS_PHP=`find -type f -name "*.php" -exec grep "@TODO" {} \; | grep "@" --count` +echo " - TODOs in TPL..." +TODOS_TPL=`find -type f -name "*.tpl" -exec grep "@TODO" {} \; | grep "@" --count` +echo " - TODOs in XML..." +TODOS_XML=`find -type f -name "*.xml" -exec grep "@TODO" {} \; | grep "@" --count` +echo " - DEPRECATED in PHP..." +DEPRECATED_PHP=`find -type f -name "*.php" -exec grep "@DEPRECATED" {} \; | grep "@" --count` +echo " - DEPRECATED in TPL..." +DEPRECATED_TPL=`find -type f -name "*.tpl" -exec grep "@DEPRECATED" {} \; | grep "@" --count` +echo " - DEPRECATED in XML..." +DEPRECATED_XML=`find -type f -name "*.xml" -exec grep "@DEPRECATED" {} \; | grep "@" --count` +echo " - global statements..." +GLOBALS=`find -type f -name "*.php" -exec grep -Hn "global " {} \; | grep -v "//" | grep -v "security_functions.php" | grep -v "phpmailer" --count` +echo "$0: Result..." +echo "--------------------------------------" +echo " - Open TODOs: ${TODOS_PHP}/${TODOS_TPL}/${TODOS_XML}" +echo " - Open DEPRECATED: ${DEPRECATED_PHP}/${DEPRECATED_TPL}/${DEPRECATED_XML}" +echo " - global statements: ${GLOBALS}" +echo "--------------------------------------" +echo "$0: Thanks for waiting for the final release 0.2.1-FINAL! :-)" +echo +exit 0