------------------------------------------------------------ revno: 13580 revision-id: squid3@treenet.co.nz-20140913164645-d7j4ebqacysvxq4k parent: squid3@treenet.co.nz-20140913150400-efx7xnia9uho7xd6 committer: Amos Jeffries branch nick: trunk timestamp: Sun 2014-09-14 04:46:45 +1200 message: Source Maintenance: fix various maintenance script issues * ensure auto-generated .list are sorted, instead of ad-hoc system dependent ordering which can cause needless updates. * grep only paths with *.* (usually files) instead of all items in each directory. This avoids scanning sub-directory indexes with grep, which produces fatal errors on some systems. * add check for Squid Software Foundation copyright blurb and highlight files needing attention. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140913164645-d7j4ebqacysvxq4k # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 3126828ff018c5afeb38388e1a91d9c8073920cb # timestamp: 2014-09-15 10:53:16 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20140913150400-\ # efx7xnia9uho7xd6 # # Begin patch === modified file 'scripts/source-maintenance.sh' --- scripts/source-maintenance.sh 2014-09-13 15:04:00 +0000 +++ scripts/source-maintenance.sh 2014-09-13 16:46:45 +0000 @@ -46,7 +46,7 @@ # # Scan for incorrect use of #ifdef/#ifndef # -grep -E "ifn?def .*_SQUID_" ./* | grep -v -E "_H$" | while read f; do echo "PROBLEM?: ${PWD} ${f}"; done +grep -E "ifn?def .*_SQUID_" ./*.* | grep -v -E "_H$" | while read f; do echo "PROBLEM?: ${PWD} ${f}"; done # # Scan for file-specific actions @@ -131,7 +131,7 @@ # # DEBUG Section list maintenance # - grep " DEBUG: section" <${FILENAME} | sed -e 's/ \* DEBUG: //' >>${ROOT}/doc/debug-sections.tmp + grep " DEBUG: section" <${FILENAME} | sed -e 's/ \* DEBUG: //' -e 's%/\* DEBUG: %%' -e 's% \*/%%' | sort -u >>${ROOT}/doc/debug-sections.tmp # # File permissions maintenance. @@ -154,6 +154,14 @@ esac + # check for Foundation copyright blurb + if test -f ${PWD}/${FILENAME}; then + BLURB=`grep "The Squid Software Foundation and contributors" ${FILENAME}`; + if test "x${BLURB}" = "x"; then + echo "CHECK COPYRIGHT for ${PWD}/${FILENAME}" + fi + fi + if test "$FILENAME" = "libltdl" ; then : elif test -d $FILENAME ; then @@ -181,7 +189,7 @@ # Build icons install include from current icons available ( echo -n "ICONS=" -for f in `ls -1 ${ROOT}/icons/silk/*` +for f in `ls -1 ${ROOT}/icons/silk/* | sort -u` do echo " \\" echo -n " ${f}" @@ -192,7 +200,7 @@ # Build templates install include from current templates available ( echo -n "ERROR_TEMPLATES=" -for f in `ls -1 ${ROOT}/errors/templates/ERR_*` +for f in `ls -1 ${ROOT}/errors/templates/ERR_* | sort -u` do echo " \\" echo -n " ${f}" @@ -203,7 +211,7 @@ # Build errors translation install include from current .PO available ( echo -n "TRANSLATE_LANGUAGES=" -for f in `ls -1 ${ROOT}/errors/*.po` +for f in `ls -1 ${ROOT}/errors/*.po | sort -u` do echo " \\" echo -n " ${f}" @@ -214,7 +222,7 @@ # Build manuals translation install include from current .PO available ( echo -n "TRANSLATE_LANGUAGES=" -for f in `ls -1 ${ROOT}/doc/manuals/*.po` +for f in `ls -1 ${ROOT}/doc/manuals/*.po | sort -u` do echo " \\" echo -n " ${f}" @@ -225,7 +233,7 @@ # Build STUB framework include from current stub_* available ( echo -n "STUB_SOURCE= tests/STUB.h" -for f in `ls -1 ${ROOT}/src/tests/stub_*.cc` +for f in `ls -1 ${ROOT}/src/tests/stub_*.cc | sort -u` do echo " \\" echo -n " ${f}"