Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit 1879890

Browse files
committed
update/fix gb_local loading logic
1 parent 1bc6b8b commit 1879890

File tree

2 files changed

+14
-29
lines changed

2 files changed

+14
-29
lines changed

container/psom_gb_vars.m_singularity

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
%% this script to initialize the variables. If PSOM does not behave the way
44
%% you want, this might be the place to fix that.
55

6-
gb_psom_gb_vars = true;
6+
if ~exist('gb_psom_gb_vars','var')
7+
gb_psom_gb_vars = true;
8+
else
9+
return
10+
end
711

812
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
913
%% The following variables need to be changed to configure the pipeline %%
@@ -74,7 +78,7 @@ end
7478
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7579

7680
% PSOM version
77-
gb_psom_version = '2.2.1'; % PSOM release number
81+
gb_psom_version = '2.2.2'; % PSOM release number
7882

7983
% Is the environment Octave or Matlab ?
8084
if exist('OCTAVE_VERSION','builtin')
@@ -164,31 +168,8 @@ for gb_psom_pdf_viewer = gb_psom_list_pdf
164168
end
165169
end
166170

167-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
168-
%% Any following line will be executed at the begining of every PSOM command and every job %%
169-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
170-
171-
%% Uncomment the following line to load the image processing package in Octave
172-
173-
% pkg load image
174-
175-
%% Don't use more to verbose "on-the-fly" in Octave
176-
177-
% more off
178-
179-
%% Use .mat files compatible with Matlab in Octave
180-
181-
% default_save_options('-7');
182-
183-
%% This is a bit of a dangerous option, but it makes things run faster in Octave.
184-
%% You'll have to exit octave and start again if you want any change in the functions to be
185-
%% taken into account.
186-
187-
% ignore_function_time_stamp ('all')
188171

189-
%% Use the local configuration file if any, will overwite global config
190-
if ~exist('gb_psom_gb_vars_local','var')&&exist('psom_gb_vars_local.m','file')
191-
gb_psom_gb_vars_local = true;
172+
if exist('psom_gb_vars_local.m','file')
192173
psom_gb_vars_local
193174
return
194175
end

psom_gb_vars.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
%% this script to initialize the variables. If PSOM does not behave the way
44
%% you want, this might be the place to fix that.
55

6-
gb_psom_gb_vars = true;
6+
7+
if ~exist('gb_psom_gb_vars','var')
8+
gb_psom_gb_vars = true;
9+
else
10+
return
11+
end
712

813
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
914
%% The following variables need to be changed to configure the pipeline %%
@@ -187,8 +192,7 @@
187192
% ignore_function_time_stamp ('all')
188193

189194
%% Use the local configuration file if any, will overwite global config
190-
if ~exist('gb_psom_gb_vars_local','var')&&exist('psom_gb_vars_local.m','file')
191-
gb_psom_gb_vars_local = true;
195+
if exist('psom_gb_vars_local.m','file')
192196
psom_gb_vars_local
193197
return
194198
end

0 commit comments

Comments
 (0)