d093948663704ab5df8786ab5d96318841e9d577
[mailer.git] / contrib / remove-deprecated.sh
1 #!/bin/sh
2
3 if ! test -e "modules.php"; then
4         echo "$0: Please execute this script from root directory."
5         exit 1
6 fi
7
8 echo "$0: Searching for deprecated PHP scripts ..."
9 LIST1=`find -type f -name "*.php" -size 24c -exec grep -H "@DEPRECATED" {} \;`
10
11 echo "$0: Searching for deprecated templates ..."
12 LIST2=`find -type f -name "*.tpl" -exec grep -H "@DEPRECATED" {} \;`
13
14 LIST="${LIST1} ${LIST2}"
15
16 if test "${LIST}" != " "; then
17         echo "${LIST}" | cut -d ":" -f 1 | xargs git rm
18         sh `dirname $0`/todo-builder.sh
19 fi