X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=contrib%2Fremove-deprecated.sh;h=049b30e3e347afa835206a60206704c9df67e134;hp=cd8d9f058ea7f2886b39c7824e599a296565fea1;hb=f57dd51863ec9baacba447d76b46d5c709b9b02e;hpb=b4683952aea678cf8e45d95989176073961de136 diff --git a/contrib/remove-deprecated.sh b/contrib/remove-deprecated.sh index cd8d9f05..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 svn --force del - sh ./todo-builder.sh +if [ -n "${LIST}" ] +then + echo "${LIST}" | xargs git rm --force + sh ./contrib/todo-builder.sh fi