Simulink Support Package for LEGO MINDSTORMS NXT hardware (R2012b)
12 Sep 2012
06 Dec 2013)
Simulink block library for creating models that run directly on your LEGO MINDSTORMS NXT robot
% Copyright 2012 The MathWorks, Inc.
% FIXME: pass in the file to modify as an argument from the makefile.
demoFiles = dir('*.html');
[~, fAtt] = fileattrib(demoFiles(p).name);
% File is writable, go ahead and clean the file
% NOTE: this protects trying to update some other manually published demo that is
% still checked in.
fprintf('Cleaning demo file %s\n', demoFiles(p).name);
fid = fopen(demoFiles(p).name);
demoHTML = fscanf(fid, '%c');
% Update style sheet path
demoHTML = strrep(demoHTML, ...
['href="' mlStyleSheet '"'], ...
'href="./style.css"'); % new path
fid = fopen(demoFiles(p).name, 'w');
fprintf(fid, '%c', demoHTML);
fprintf('Skipping demo file %s because it is not writable\n', demoFiles(p).name);