Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion mesh/cdt.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,15 @@
save(tmpf,'-regexp',sprintf('^%s$|',variables{:}),'-ascii');
% get md5 checksum on input "state", we append .cache.mat to the check sum
% because we'll use the checksum as the cache file name
[s,cache_name] = system(['/sbin/md5 -r ' tmpf ' | awk ''{printf "."$1".cache.mat"}''']);
if ismac
[~,cache_name] = system(['/sbin/md5 -r ' tmpf ' | awk ''{printf "."$1".cache.mat"}''']);
elseif isunix
[~,cache_name] = system(['md5sum ' tmpf ' | awk ''{printf "."$1".cache.mat"}''']);
else
[~,cache_name] = system(['CertUtil -hashfile ' tmpf ' MD5']);
cache_name = feval(@(x) ['.' x{2} '.cache.mat'], ...
strsplit(cache_name, '\n'));
end
% clean up
delete(tmpf);
clear s tmpf variables;
Expand Down