annotate core/tools/camirversion.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function [rev, latest] = camirversion()
wolffd@0 2 % returns the global version of the camir project
wolffd@0 3
wolffd@0 4 global globalvars;
wolffd@0 5 curpath = pwd;
wolffd@0 6
wolffd@0 7 % go to camir directory
wolffd@0 8 cd (globalvars.camir.path);
wolffd@0 9 tmp = textscan(evalc('!svnversion'),'%s');
wolffd@0 10
wolffd@0 11 % return to current directory
wolffd@0 12 cd (curpath);
wolffd@0 13
wolffd@0 14 rev = tmp{1};
wolffd@0 15 latest = textscan(rev{1},'%d','Delimiter',':');
wolffd@0 16 if ~isempty(latest{1})
wolffd@0 17 latest = double(latest{end}(end));
wolffd@0 18 else
wolffd@0 19 latest='-1';
wolffd@0 20 end