diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-16 23:49:37 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-16 23:49:37 +0000 |
commit | 2b1dbf1eb50dcd16bfb0fcf1404d3a5d736a022f (patch) | |
tree | 3018ad4982d16433589073d40506b4dcf23ee9e5 /merge-helpers | |
parent | 74842d341743f9c9f254a06f41c31cd384f3bd66 (diff) |
2009-07-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* ChangeLog, check_bsp: New files.
Diffstat (limited to 'merge-helpers')
-rw-r--r-- | merge-helpers/ChangeLog | 4 | ||||
-rwxr-xr-x | merge-helpers/check_bsp | 77 |
2 files changed, 81 insertions, 0 deletions
diff --git a/merge-helpers/ChangeLog b/merge-helpers/ChangeLog new file mode 100644 index 0000000..1227d41 --- /dev/null +++ b/merge-helpers/ChangeLog @@ -0,0 +1,4 @@ +2009-07-16 Joel Sherrill <joel.sherrill@oarcorp.com> + + * ChangeLog, check_bsp: New files. + diff --git a/merge-helpers/check_bsp b/merge-helpers/check_bsp new file mode 100755 index 0000000..5e0dcef --- /dev/null +++ b/merge-helpers/check_bsp @@ -0,0 +1,77 @@ +# +# Script to test for various things we want in a BSP when it is +# submitted. +# +# Test for: +# - presense of BSP_BOOTCARD_OPTIONS +# - XXX +# + +if [ $# -ne 1 ] ; then + echo Usage: $0 BSPDIR + exit 1 +fi + +bspdir=${1} + +if [ ! -d ${bspdir} ] ; then + echo ${bspdir} is not a directory + exit 1 +fi + +cd ${bspdir} +if [ $? -ne 0 ] ; then + echo Unable to cd to ${bspdir} + exit 1 +fi + + +test_its_there() +{ + if [ $# -ne 2 ] ; then + echo Usage: $0 FILE pattern + fi + grep ${2} ${1} >/dev/null + if [ $? -ne 0 ] ; then + echo ${2} is NOT in ${bspdir}/${1} + fi + +} + +test_its_NOT_there() +{ + if [ $# -ne 2 ] ; then + echo Usage: $0 FILE pattern + fi + grep ${2} ${1} >/dev/null + if [ $? -eq 0 ] ; then + echo ${2} SHOULD NOT BE IN ${bspdir}/${1} + fi + +} + +test_its_there configure.ac RTEMS_BSP_BOOTCARD_OPTIONS +test_its_there configure.ac RTEMS_BSP_CLEANUP_OPTIONS + +# really need to make the copyright strings consistent in BSPs +find . -name "*.[chS]" | while read f +do + grep -i COPYRIGHT ${f} >/dev/null + if [ $? -ne 0 ] ; then + echo Copyright is NOT in ${bspdir}/${f} + fi +done + +# We want CVS Id strings everywhere possible +find . -name "*.[chS]" -o -name "*.ac" -o -name "Makefile.am" | while read f +do + test_its_there ${f} "\$Id" +done + +# We want CVS Id strings everywhere possible +find . -name "*.[chS]" -o -name "*.ac" -o -name "Makefile.am" | while read f +do + test_its_NOT_there ${f} printf + test_its_NOT_there ${f} puts +done + |