From 296ed1b6a87364a2c56af8bffbc0692633505835 Mon Sep 17 00:00:00 2001 From: "M. Hock" <martin.hock@fst.tu-darmstadt.de> Date: Fri, 18 Mar 2022 20:49:26 +0100 Subject: [PATCH] Commented out the calls to Matlab by reading the file, finding the calls by line, and adding a '%' on a line by line basis. Closes #117 --- +PlotID/createFileCopy.m | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/+PlotID/createFileCopy.m b/+PlotID/createFileCopy.m index 297203c..6620755 100644 --- a/+PlotID/createFileCopy.m +++ b/+PlotID/createFileCopy.m @@ -74,8 +74,27 @@ end end%if copyfile(FileNameAndLocation,RemotePath); storagePaths{i} = RemotePath; + + % Comment out call to Publish in Scriptfile + switch type + case 'script' + scripttext = regexp(fileread(RemotePath),'\n','split'); + commentlines = find(contains(scripttext,'PlotID.')); + scriptfid= fopen(RemotePath,'w'); + for j=1:length(scripttext) + if ismember(j,commentlines) + fprintf(scriptfid,'%s %s\n','%',scripttext{j}); + else + fprintf(scriptfid,'%s\n',scripttext{j}); + end + end + fclose(scriptfid); + end + end %for status = true; + + msg =([type, ' successfully published']); % catch % status = false; -- GitLab