Changeset 20377
- Timestamp:
- 03/29/16 11:37:11 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/os/issmdir.m
r13170 r20377 5 5 % ISSM_DIR=issmdir() 6 6 7 if ~ispc(), 8 ISSM_DIR =getenv('ISSM_DIR'); 7 %Initialize output ISSM_DIR 8 ISSM_DIR=''; 9 10 %Get ISSM_DIR from function path (we do not want to force users to edit their bashrc) 11 path=which('issmdir'); 12 13 %issmdir might be in bin, 14 pos=strfind(path,'bin/issmdir.m'); 15 if ~isempty(pos), 16 ISSM_DIR=path(1:pos-1); 9 17 else 10 ISSM_DIR =getenv('ISSM_DIR_WIN');11 if strcmpi(ISSM_DIR(end),'/') | strcmpi(ISSM_DIR(end),'\'),12 ISSM_DIR = ISSM_DIR(1:end-1); %shave off the last '/'18 pos=strfind(path,'src/m/os/issmdir.m'); 19 if ~isempty(pos), 20 ISSM_DIR=path(1:pos-1); 13 21 end 14 22 end 15 23 16 if (isempty(ISSM_DIR)),17 error(' issmdir error message: ''ISSM_DIR'' environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!');24 if isempty(ISSM_DIR), 25 error('Could not determine the location of ISSM...'); 18 26 end
Note:
See TracChangeset
for help on using the changeset viewer.