#!/bin/sh
-if ! test -e "svn-externals.txt"; then
- echo "$0: Please execute this script from root directory."
- exit 1
+if ! test -e ".gitignore"; 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" {} \;`
+LIST=$(find -type f -name "*.php" -size 21c -exec grep -H "@DEPRECATED" {} \; | grep -v "/core/" | cut -d ":" -f 1)
-LIST="${LIST1} ${LIST2}"
-
-if test "${LIST}" != " "; then
- echo "${LIST}" | cut -d ":" -f 1 | xargs git rm --force
- sh ./todo-builder.sh
+if [ -n "${LIST}" ]
+then
+ echo "${LIST}" | xargs git rm --force
+ sh ./contrib/todo-builder.sh
fi