File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ function update(scheduled)
1111% TODO Find quicker way to check for changes
1212% See also DAT.PATHS
1313
14- % If not given as input argument, find 'scheduled ' in 'dat.paths'. If not
15- % found, set 'scheduled' to 0.
14+ % If not given as input argument, use 'updateSchedule ' in 'dat.paths'. If
15+ % not found, set 'scheduled' to 0.
1616if nargin < 1 ; scheduled = getOr(dat .paths , ' updateSchedule' , 0 ); end
1717root = fileparts(which(' addRigboxPaths' )); % Rigbox root directory
1818% Attempt to find date of last fetch
@@ -26,9 +26,9 @@ function update(scheduled)
2626% 2. The updates are scheduled for today and the last fetch was today.
2727% 3. The updates are scheduled for every day and the last fetch was less
2828% than an hour ago.
29- if (( scheduled && weekday(now )) ~= ( scheduled && ( now - lastFetch < 7 )) ) || ...
30- (( scheduled && weekday(now )) == ( scheduled && ( now - lastFetch < 1 )) ) || ...
31- (~scheduled && ( now - lastFetch < 1 / 24 ) )
29+ if (scheduled && ( weekday(now ) ~= scheduled ) && now - lastFetch < 7 ) || ...
30+ (scheduled && ( weekday(now ) == scheduled ) && now - lastFetch < 1 ) || ...
31+ (~scheduled && now - lastFetch < 1 / 24 )
3232 return
3333end
3434disp(' Updating code...' )
You can’t perform that action at this time.
0 commit comments