Merge branch 'contrib' into 'master'
[mailer.git] / contrib / remove-deprecated.sh
diff --git a/contrib/remove-deprecated.sh b/contrib/remove-deprecated.sh
new file mode 100755 (executable)
index 0000000..99ea271
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+if ! test -e "modules.php"; then
+       echo "$0: Please execute this script from root directory."
+       exit 1
+fi
+
+echo "$0: Searching for deprecated PHP scripts ..."
+LIST1=`find -type f -name "*.php" -size 24c -exec grep -H "@DEPRECATED" {} \;`
+
+echo "$0: Searching for deprecated templates ..."
+LIST2=`find -type f -name "*.tpl" -exec grep -H "@DEPRECATED" {} \;`
+
+LIST="${LIST1} ${LIST2}"
+
+if test "${LIST}" != " "; then
+       echo "${LIST}" | cut -d ":" -f 1 | xargs svn --force del
+       sh ../../contrib/todo-builder.sh
+fi