Commit 5d47f006 authored by Andrew Cohen's avatar Andrew Cohen

don't drop 1st line !

parent 9fc2fdb8
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Copyright 2011-2016 Andrew Cohen, Eric Wait, Mark Winter, Walt
% Mankowski
%
% This file is part of LEVer - the tool for stem cell lineaging. See
% http://n2t.net/ark:/87918/d9rp4t for details
%
% LEVer is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% LEVer is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with LEVer in file "gnu gpl v3.txt". If not, see
% <http://www.gnu.org/licenses/>.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dlist = dir('*');
for dd=1:length(dlist)
if ~dlist(dd).isdir || length(dlist(dd).name)<4
......@@ -6,7 +31,7 @@ for dd=1:length(dlist)
if strcmp(dlist(dd).name,'+assign') | strcmp(dlist(dd).name,'+matlab_bgl')
continue
end
goHeader(['.\' dlist(dd).name '\']);
license.goHeader(['.\' dlist(dd).name '\']);
end
goHeader('.\');
license.goHeader('.\');
......@@ -23,7 +23,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function txt=getFileText(filename)
fid = fopen(filename,'rt');
i=1;
......
......@@ -24,6 +24,31 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Copyright 2011-2016 Andrew Cohen, Eric Wait, Mark Winter, Walt
% Mankowski
%
% This file is part of LEVer - the tool for stem cell lineaging. See
% http://n2t.net/ark:/87918/d9rp4t for details
%
% LEVer is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% LEVer is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with LEVer in file "gnu gpl v3.txt". If not, see
% <http://www.gnu.org/licenses/>.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function goHeader(folder)
flist = dir(fullfile(folder, '*.m'));
for ff=1:length(flist)
......@@ -44,6 +69,6 @@ for ff=1:length(flist)
txt(idxPreamble(1):idxPreamble(2))=[];
end
txtRedone={txt{1:idxPreamble(1)-1} txtPreamble{:} txt{idxPreamble(1)+1:end}};
txtRedone={txt{1:idxPreamble(1)-1} txtPreamble{:} txt{idxPreamble(1):end}};
license.writeFileText(fullfile(folder,flist(ff).name),txtRedone);
end
......@@ -23,9 +23,9 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function writeFileText(filename,txt)
fid = fopen(filename,'wt');
for i=1:length(txt)
fprintf(fid,'%s',txt{i});
end
fclose(fid)
fclose(fid);
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