get_all_lukeversions_jd

PURPOSE ^

SYNOPSIS ^

function LUKE_list = get_all_lukeversions_jd

DESCRIPTION ^

 find all LUKE installations on the machine

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function LUKE_list = get_all_lukeversions_jd
0002 %
0003 % find all LUKE installations on the machine
0004 %
0005 disp(' ');
0006 disp('List all LUKE installations on the machine');
0007 disp(' ');
0008 %
0009 LUKE_search_default = getenv('HOME');
0010 LUKE_list = [];
0011 %
0012 while 1,
0013     %
0014     LUKE_search_path = input(['Enter a path to search for LUKE installations (Enter "0" when done) ? [',LUKE_search_default,'] '],'s');
0015     %
0016     if isempty(LUKE_search_path),
0017         LUKE_search_path = LUKE_search_default;
0018     end
0019     %
0020     if strcmp(LUKE_search_path,'0'),
0021         break
0022     end
0023     %
0024     if exist(LUKE_search_path,'dir'),
0025         [~,LUKEversion_char] = unix(['find ',getenv('HOME'),' -name LUKEversion_jd.m']);
0026         %
0027         while ~isempty(LUKEversion_char),
0028             nexteof = find(double(LUKEversion_char) == 10,1,'first');
0029             LUKEversion_path = LUKEversion_char(1:nexteof-1);% full LUKEversion_jd.m path
0030             %
0031             LUKE_root = LUKEversion_path(1:strfind(LUKEversion_path,'/Project_DKE/DKE/LUKEversion_jd.m'));
0032             %
0033             % get corresponding LUKE version
0034             %
0035             wd = pwd;
0036             cd(fileparts(LUKEversion_path));
0037             LUKEversion = LUKEversion_jd;
0038             cd(wd);
0039             %
0040             LUKE_list(end+1).root = LUKE_root;
0041             LUKE_list(end).version = LUKEversion;
0042             %
0043             disp([LUKEversion,' : ',LUKE_root])
0044             %
0045             LUKEversion_char = LUKEversion_char(nexteof+1:end);
0046             %
0047         end
0048         %
0049     else
0050         disp('Warning : This path does not exist.')
0051     end
0052     %
0053     LUKE_search_default = '0';
0054     %
0055 end
0056 %

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.