0001 function [home,installeddir] = where_am_iSa()
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 home = getenv('CBASS_HOME');
0012 installeddir = getenv('CBASSSA_INSTALLEDDIR');
0013
0014 if(~length(installeddir))
0015
0016
0017
0018 installeddir='cbass_analysis';
0019
0020
0021 end
0022
0023 if (~length(home))
0024
0025
0026
0027 [r, home] = unix('printenv HOME');
0028 [r, hostname] = unix('printenv HOSTNAME');
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 if ~strcmp(home(1:5),'/home')
0041
0042 startpt=find(home=='/');
0043 home=home(startpt(1):end-1);
0044 clear startpt
0045 else
0046 home=home(1:end-1);
0047 end
0048
0049
0050 if (~isempty(strfind(home,'taylora')))
0051 home = '/Volumes/Data/CBASS'
0052 addpath([home, '/cbass_analysis/angela']);
0053 elseif( strfind(home, 'cbassusr'))
0054
0055 home = '/scratch/falcon_4/cbassusr/cbass';
0056 elseif(strfind(home, 'zuntz'))
0057 home = '/Users/zuntz/src/cbass';
0058 elseif(strfind(home,'mirfan'))
0059 home = '/scratch/falcon_4/mirfan/cbass';
0060 elseif(strfind(home,'cdickins') & strfind(hostname,'falcon'))
0061 home = '/scratch/falcon_4/cdickins/cbass';
0062 elseif(strfind(home,'cdickins') & strfind(hostname,'haggis'))
0063 home = '/scr/cdickins/cbass';
0064 elseif(strfind(home,'tjp') & strfind(hostname,'haggis'))
0065 home = '/home/tjp';
0066 elseif(strfind(home,'oliver'))
0067 home = '/Users/oliver';
0068 elseif(strfind(hostname,'elephant'))
0069 home = '/elephant';
0070 end
0071
0072
0073
0074
0075 end;
0076
0077
0078
0079 return;