Changeset 135


Ignore:
Timestamp:
Nov 25, 2010, 4:56:33 PM (13 years ago)
Author:
sommeria
Message:

supercmd compatible with windows also

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r134 r135  
    454454filebase=get(handles.RootName,'String');
    455455ext_imadoc=get(handles.ImaDoc,'String');
    456 browse=get(handles.browse_root,'UserData')%default
     456browse=get(handles.browse_root,'UserData');%default
    457457if isfield(browse,'nom_type_ima')
    458458    nom_type_ima=browse.nom_type_ima;% get an image nomenclature type already determined by an input image name
     
    20952095            %endTESTgrid
    20962096            i_cmd=i_cmd+1;
    2097             filename_cmx(1:end-4)
    20982097            cmd_CIV2=CIV2_CMD(filename_cmx(1:end-4),namelog,par_civ2,sparam);
    20992098            if isequal(civAll,0)
     
    22332232            %% to lauch the jobs locally :
    22342233            if(isunix)
    2235               cmd_str=['!. ' filename_bat ' &'];
    2236 %                 cmd_str=['!. ' filename_bat];
    2237                 display(cmd_str)
    2238      %            cmd_str=['!at -qb now -f ' filename_bat ' &']; %ou at -qb now -f bad idea...
     2234                cmd_str=['. ' filename_bat];
     2235                % cmd_str=['!at -qb now -f ' filename_bat ' &']; %ou at -qb now -f bad idea...
    22392236            else %case of Windows
    2240                cmd_str=['!' filename_bat ' &'];
    2241             end
    2242                super_cmd=[super_cmd '. ' filename_bat '\n']
    2243 %             eval(cmd_str);
    2244 %             display(cmd_str);
    2245         end
    2246     end
    2247 end
    2248 
    2249            
    2250 % filename_superbat(end-2:end)='bat';
    2251 %         fid=fopen(filename_bat,'w');
    2252 %         fprintf(fid,cmd);
    2253 %         fclose(fid);
     2237                cmd_str=['@call ' regexprep(filename_bat,'\\','\\\\')];
     2238            end
     2239            super_cmd=[super_cmd cmd_str '\n'];         
     2240            %             eval(cmd_str);
     2241            disp(cmd_str);
     2242        end
     2243    end
     2244end
     2245
    22542246
    22552247if ~batch%TODO: a revoir, cas 'run as background task'
    2256     eval(['!. ' filename_superbat ' &'])
    22572248    [Rootbat,Filebat,extbat]=fileparts(filename_cmx);
    2258     filename_superbat=fullfile(Rootbat,['toto.bat']);
     2249    filename_superbat=fullfile(Rootbat,['job_list.bat']);
    22592250    fid=fopen(filename_superbat,'w');
    22602251    fprintf(fid,super_cmd');
    22612252    fclose(fid);
     2253    if(isunix)
     2254        eval(['!. ' filename_superbat ' &']);
     2255    else
     2256        eval(['!' filename_superbat ' &']);
     2257    end
    22622258end
    22632259
     
    24612457if isequal(subdir_civ1,''),subdir_civ1='A'; end% put default subdir
    24622458if isequal(subdir_civ2,''),subdir_civ2=subdir_civ1; end% put default subdir
    2463 currentdir=pwd%store the current working directory
     2459currentdir=pwd;%store the current working directory
    24642460[Path_ima,Name]=fileparts(filebase);%Path of the image files (.civ)
    24652461if ~exist(Path_ima,'dir')
Note: See TracChangeset for help on using the changeset viewer.