X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=todo-builder.sh;h=360b8888e2509f057431d6cc6dd4a8803a30140e;hb=f317859d529a50cb01bef52b51c0be3bf70b989b;hp=0e144eb4b9dc5fe06674b154bdfb9f6ed7c56582;hpb=24d6e563e581cfa4f88c4b8fe14396b3695da167;p=mailer.git diff --git a/todo-builder.sh b/todo-builder.sh index 0e144eb4b9..360b8888e2 100755 --- a/todo-builder.sh +++ b/todo-builder.sh @@ -1,37 +1,24 @@ #!/bin/sh -# This script helps building the file DOCS/TODOs.txt and should be executed by +# This script helps building the file docs/TODOs.txt and should be executed by # developers with SVN write-access -if ! test -e "modules.php"; then - echo "$0: Please execute this script from root directory." - exit 1 -fi - -TODO="DOCS/TODOs.txt" -LOG="DOCS/template-warnings.log" +TYPES="php ctp xml" -echo "$0: Generating TODOs.txt ..." -echo "### WARNING: THIS FILE IS AUTO-GENERATED BY $0 (uid=${UID}/user=${USER}) ###" > ${TODO} -echo "### DO NOT EDIT THIS FILE. ###" >> ${TODO} -echo "$0: Searching for @TODO ..." -find -type f -name "*.php" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO} -find -type f -name "*.tpl" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO} -find -type f -name "*.xml" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO} -find -type f -name "*.js" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO} -find -type f -name ".htaccess" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO} -echo "### ### DEPRECATION FOLLOWS: ### ###" >> ${TODO} -echo "$0: Searching for @DEPRECATED ..." -find -type f -name "*.php" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO} -find -type f -name "*.tpl" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO} -find -type f -name "*.xml" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO} -find -type f -name "*.js" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO} -find -type f -name ".htaccess" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO} -echo "$0: Checking for template-warnings.log ..." -if test -e "${LOG}"; then - echo "$0: Found a template-warnings.log, adding it..." - echo "### ### template-warnings.log follows: ### ###" >> ${TODO} - cat ${LOG} >> ${TODO} +if ! test -e "index.php"; then + echo "$0: Please execute this script from root directory." + exit 1 fi + +echo "$0: Generating TODOs.txt..." +echo "### WARNING: THIS FILE IS AUTO-GENERATED BY $0 ###" > docs/TODOs.txt +echo "### DO NOT EDIT THIS FILE. ###" >> docs/TODOs.txt +for type in $TYPES; do + find -type f -name "*.$type" -exec grep -Hin "@TODO" {} \; | sort >> docs/TODOs.txt +done +echo "### ### DEPRECATION FOLLOWS: ### ###" >> docs/TODOs.txt +for type in $TYPES; do + find -type f -name "*.$type" -exec grep -Hin "@DEPRECATED" {} \; | sort >> docs/TODOs.txt +done echo "$0: Done." exit 0