X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=contrib%2Fremove-deprecated.sh;h=049b30e3e347afa835206a60206704c9df67e134;hp=d075762bad21cc5308d19dea86629bf78a1c14b7;hb=HEAD;hpb=3a6c4a08c0ac66d84e7726f65f7d03e6677ab22e diff --git a/contrib/remove-deprecated.sh b/contrib/remove-deprecated.sh index d075762b..049b30e3 100755 --- a/contrib/remove-deprecated.sh +++ b/contrib/remove-deprecated.sh @@ -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