Commit cca4784b authored by Andrew Cohen's avatar Andrew Cohen

support for exclude files

parent 063a175b
......@@ -35,10 +35,11 @@ end
license.goHeader('.\');
% c files
excludeFiles={'sha1.h','sha1.c'};
dlist=dir('..\c');
for dd=1:length(dlist)
if ~dlist(dd).isdir || length(dlist(dd).name)<4
continue
end
license.goHeader(['.\' dlist(dd).name '\'],1);
license.goHeader(['..\c\' dlist(dd).name '\'],1,excludeFiles);
end
......@@ -22,16 +22,21 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function goHeader(folder,bC)
function goHeader(folder,bC,excludeFiles)
if nargin<2
bC=0;
end
if nargin<3
excludeFile={};
end
if bC
flist = dir(fullfile(folder, '*.cpp'));
flist = [flist;dir(fullfile(folder, '*.c'))];
flist = [flist;dir(fullfile(folder, '*.h'))];
% note - this is the old token for the c code. this will need to change
% to ******* as per the new licenseheader.c
strToken='//////////';
% strToken='//////////';
strToken='**********';
txtPreamble = license.getFileText('.\+license\LicenseHeader.c');
else
flist = dir(fullfile(folder, '*.m'));
......@@ -39,7 +44,9 @@ else
txtPreamble = license.getFileText('.\+license\LicenseHeader.m');
end
for ff=1:length(flist)
if any(strcmp(excludeFiles,flist(ff).name))
continue
end
txt = license.getFileText(fullfile(folder,flist(ff).name));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment