Continued:
[core.git] / contrib / remove-deprecated.sh
index d075762bad21cc5308d19dea86629bf78a1c14b7..049b30e3e347afa835206a60206704c9df67e134 100755 (executable)
@@ -1,16 +1,15 @@
 #!/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