Skip to content
Snippets Groups Projects
Commit c6e323d2 authored by Andrew Cohen's avatar Andrew Cohen
Browse files

token for c files - fix from matlab headerr on c files

parent fbc573a2
Branches
Tags
No related merge requests found
...@@ -37,19 +37,20 @@ if bC ...@@ -37,19 +37,20 @@ if bC
% to ******* as per the new licenseheader.c % to ******* as per the new licenseheader.c
% strToken='//////////'; % strToken='//////////';
strToken='**********'; strToken='**********';
txtPreamble = license.getFileText('.\+license\LicenseHeader.c'); % get matlab headers out of c files...
% strToken='%%%%%%%%%%';
fnamePreamble='.\+license\LicenseHeader.c';
else else
flist = dir(fullfile(folder, '*.m')); flist = dir(fullfile(folder, '*.m'));
strToken='%%%%%%%%%%'; strToken='%%%%%%%%%%';
fnamePreamble='.\+license\LicenseHeader.m';
end end
for ff=1:length(flist) for ff=1:length(flist)
if any(strcmp(excludeFiles,flist(ff).name)) if any(strcmp(excludeFiles,flist(ff).name))
continue continue
end end
txt = license.getFileText(fullfile(folder,flist(ff).name)); txt = license.getFileText(fullfile(folder,flist(ff).name));
txtPreamble = license.getFileText('.\+license\LicenseHeader.m'); txtPreamble = license.getFileText(fnamePreamble);
idxPreamble = find(cellfun(@(x) ~isempty(strfind(x,strToken)),txt),2); idxPreamble = find(cellfun(@(x) ~isempty(strfind(x,strToken)),txt),2);
if length(idxPreamble)~=2 if length(idxPreamble)~=2
fprintf(1,'found file with no license: %s\n',flist(ff).name); fprintf(1,'found file with no license: %s\n',flist(ff).name);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment