diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2013-07-26 13:28:09 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-07-30 16:12:32 -0500 |
commit | e9b6b68017fd121ad43733164c9a35e95b0b1eb8 (patch) | |
tree | 33ff59b370cb5a0bc88f025b9ef1cd13d82d78c9 /src/build/tools | |
parent | 5168d4f925a1bcebf43547a44dd1108977b1c3b7 (diff) | |
download | talos-hostboot-e9b6b68017fd121ad43733164c9a35e95b0b1eb8.tar.gz talos-hostboot-e9b6b68017fd121ad43733164c9a35e95b0b1eb8.zip |
Workaround bug in 'file' for XML copyright prolog.
Change-Id: Iac89083b88546a3c4b59350e98c42893f320e71d
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5597
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build/tools')
-rwxr-xr-x | src/build/tools/addCopyright.pl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/build/tools/addCopyright.pl b/src/build/tools/addCopyright.pl index 022b12214..fd984a9ba 100755 --- a/src/build/tools/addCopyright.pl +++ b/src/build/tools/addCopyright.pl @@ -407,6 +407,14 @@ sub filetype chomp $fileinfo; # Sorted by anticipated frequency of occurrence. + if ( $filename =~ m/\.xml$/i ) + # Added XML file to the top of the list because some comments in + # an XML file cause older versions of 'file' to incorrectly return + # "ASCII C++ program text" even though the file is obviously XML. + # Specifically we are seeing "<!-- // ..." cause this trouble. + { + return "xml" + } if ( ( $filename =~ m/\.[cht]$/i ) ||( $filename =~ m/\.[cht]\+\+$/i ) ||( $filename =~ m/\.[cht]pp$/i ) @@ -486,10 +494,6 @@ sub filetype { return "LinkerScript"; } - if ( $filename =~ m/\.xml$/i ) - { - return "xml" - } if ( $filename =~ m/\.rule$/i ) { return "PrdRuleFile" |