From 3a6c4a08c0ac66d84e7726f65f7d03e6677ab22e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 9 Mar 2017 10:44:30 +0100 Subject: [PATCH] Cleanup: - removed old scripts which were used in SVN times - some may become useful, like remote-deprecated.sh and find-bad-php.sh - the later one now searches for discouraged ?> closing tag - the first one can now be used with GIT to remove deprecated files MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- contrib/commit-rest.sh | 22 ---------------------- contrib/commit-trunks.sh | 18 ------------------ contrib/find-bad-php.sh | 4 ++-- contrib/lint.sh | 10 ---------- contrib/patch.sh | 15 --------------- contrib/patch_core.sh | 8 -------- contrib/patch_i.sh | 9 --------- contrib/prop-set.sh | 15 --------------- contrib/remove-deprecated.sh | 2 +- contrib/todo-all.sh | 17 ----------------- 10 files changed, 3 insertions(+), 117 deletions(-) delete mode 100755 contrib/commit-rest.sh delete mode 100755 contrib/commit-trunks.sh delete mode 100755 contrib/lint.sh delete mode 100755 contrib/patch.sh delete mode 100755 contrib/patch_core.sh delete mode 100755 contrib/patch_i.sh delete mode 100755 contrib/prop-set.sh delete mode 100755 contrib/todo-all.sh diff --git a/contrib/commit-rest.sh b/contrib/commit-rest.sh deleted file mode 100755 index 423f9adb..00000000 --- a/contrib/commit-rest.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -if test "$1" = ""; then - echo "Usage: $0 \"\" [file/directory]" - exit 1 -fi - -echo "$0: Reading projects..." -if test "$2" = ""; then - LIST=`svn status */ | grep " " | grep -v "X " | cut -d " " -f 8 | cut -d "/" -f 1 | sort --unique` -else - LIST=`svn status */*/"$2" | grep "/" | grep -v "X " | cut -d " " -f 8 | cut -d "/" -f 1-2 | sort --unique` -fi - -for repos in ${LIST}; do - echo "$0: Committing in ${repos} ..." - cd "${repos}" || exit 255 - svn commit -m "$1" "$2" - cd - -done - -exit 0 diff --git a/contrib/commit-trunks.sh b/contrib/commit-trunks.sh deleted file mode 100755 index 5c44decb..00000000 --- a/contrib/commit-trunks.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -if test "$1" = ""; then - echo "Usage: $0 \"\"" - exit 1 -fi - -echo "$0: Reading projects..." -LIST=`find */trunk/application/*/*.php | cut -d "/" -f 1-2 | sort --unique` - -for repos in ${LIST}; do - echo "$0: Committing in ${repos} ..." - cd "${repos}" || exit 255 - svn commit -m "$1" - cd - -done - -exit 0 diff --git a/contrib/find-bad-php.sh b/contrib/find-bad-php.sh index 85af1b24..79cfd1dc 100755 --- a/contrib/find-bad-php.sh +++ b/contrib/find-bad-php.sh @@ -7,7 +7,7 @@ for SCRIPT in ${PHP}; do HEADER=`cat ${SCRIPT} | head -n 1 | grep -v ""` + FOOTER=`cat ${SCRIPT} | tail -n 1 | grep "?>"` if [ -n "${HEADER}" ]; then @@ -16,7 +16,7 @@ do if [ -n "${FOOTER}" ]; then - echo "$0: Script '${SCRIPT}' has non-typical footer." + echo "$0: Script '${SCRIPT}' has discouraged footer." fi LINT=`php -l "${SCRIPT}" 2>&1 | grep -v "Constant FUSE_EDEADLK already defined in Unknown on line 0" | grep -v "No syntax errors detected in"` diff --git a/contrib/lint.sh b/contrib/lint.sh deleted file mode 100755 index 00c4a2c5..00000000 --- a/contrib/lint.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -echo "$0: Analysing PHP scripts for syntax errors (lint) ..." -LINT=`find -type f -name "*.php" -exec php -l -f {} 2>&1 \; | grep -v "No syntax errors detected in"` - -if test "${LINT}" != ""; then - echo "${LINT}" -else - echo "$0: No syntax errors found." -fi diff --git a/contrib/patch.sh b/contrib/patch.sh deleted file mode 100755 index 5dbfe7db..00000000 --- a/contrib/patch.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -if test "$1" = ""; then - echo "Usage: $0 " - exit -fi - -LIST=`find ??*/trunk/ -maxdepth 0 -type d | sort --unique` - -for entry in ${LIST}; do - echo "$0: Patching in ${entry} ..." - cd "${entry}" - patch -p0 < "../../$1" - cd - -done diff --git a/contrib/patch_core.sh b/contrib/patch_core.sh deleted file mode 100755 index 6d93d1fc..00000000 --- a/contrib/patch_core.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -svn diff inc/ > ../../core/trunk/i || exit 1 -cd ../../core/trunk/ || exit 1 -svn up || exit 1 -sh ../contrib/patch_i.sh "$1" || exit 1 -cd - -svn up inc/ diff --git a/contrib/patch_i.sh b/contrib/patch_i.sh deleted file mode 100755 index 6690ae0d..00000000 --- a/contrib/patch_i.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -patch -p0 < i || exit 10 -if test "$1" = ""; then - svn commit || exit 10 -else - svn commit -m "$1" || exit 10 -fi -rm i diff --git a/contrib/prop-set.sh b/contrib/prop-set.sh deleted file mode 100755 index 1df2b4ca..00000000 --- a/contrib/prop-set.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -find -type f -name "*.php" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; -find -type f -name "*-" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; -find -type f -name "*_" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; -find -type f -name "_*.php" -exec svn propset svn:keywords "Author Id Revision HeadURL Date Tag" {} \; -find -type f -name "*.php" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "*-" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "*_" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "_*.php" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "*.jpg" -exec svn propset svn:mime-type "image/jpeg" {} \; -find -type f -name "*.png" -exec svn propset svn:mime-type "image/png" {} \; -find -type f -name "*.gif" -exec svn propset svn:mime-type "image/gif" {} \; -find -type f -name "*.txt" -exec svn propset svn:mime-type "text/plain" {} \; -find -type f -name "*.tpl" -exec svn propset svn:mime-type "text/plain" {} \; diff --git a/contrib/remove-deprecated.sh b/contrib/remove-deprecated.sh index cd8d9f05..d075762b 100755 --- a/contrib/remove-deprecated.sh +++ b/contrib/remove-deprecated.sh @@ -11,6 +11,6 @@ LIST1=`find -type f -name "*.php" -size 24c -exec grep -H "@DEPRECATED" {} \;` LIST="${LIST1} ${LIST2}" if test "${LIST}" != " "; then - echo "${LIST}" | cut -d ":" -f 1 | xargs svn --force del + echo "${LIST}" | cut -d ":" -f 1 | xargs git rm --force sh ./todo-builder.sh fi diff --git a/contrib/todo-all.sh b/contrib/todo-all.sh deleted file mode 100755 index f3a806af..00000000 --- a/contrib/todo-all.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -echo "$0: Reading projects..." -LIST=`find -maxdepth 1 -type d -name "??*" | sort --unique` -SVN_DIRS="branches tags trunk" - -for repos in $LIST; do - for svn_dir in $SVN_DIRS; do - if test -e "$repos/$svn_dir/todo-builder.sh"; then - echo "$0: Updating TODOs.txt in $repos/$svn_dir" - cd "$repos/$svn_dir/" - sh ./todo-builder.sh - svn add docs/TODOs.txt >/dev/null 2>&1 - cd - >/dev/null - fi - done -done -- 2.39.2