cosmo publish run scripts hdr

function is_ok=cosmo_publish_run_scripts(varargin)
% helper function to publish example scripts (for developers)
%
% cosmo_publish_build_html([force|fn])
%
% Inputs:
%   fn           filename of matlab file to publish (in the examples
%                directory)
%   '-force'     force rebuild, even if an output file is newer than the
%                corresponding output file
%   '-dry'       dry run: do not build any files, but show the output that
%                would be shown.
%   '-o', d      write output in directory d. By default d is
%                'doc/source/_static/publish/' relative to the CoSMoMVPA
%                root directory.
%
% Notes:
%  - if no filename is given, then all files are rebuilt if necessary
%  - this function is intended for developers (to build the website)
%  - whether an output file is out of date is first determined using
%    git: if git shows no changes to the last commit of the input file
%    then it is assumed it is not out of date. If the input file has
%    been changed since the last commit (or never been comitted), then
%    the modification date is used to determine whether it is out of date.
%  - requirements
%    * a Unix-like system
%    * a working installation of git
%    * CoSMoMVPA code present in a git repository
%
% #   For CoSMoMVPA's copyright information and license terms,   #
% #   see the COPYING file distributed with CoSMoMVPA.           #