File: disable-updater.patch

package info (click to toggle)
matlab2tikz 1.1.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,668 kB
  • sloc: objc: 6,143; makefile: 55; sh: 40
file content (37 lines) | stat: -rw-r--r-- 1,648 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Description: Disable the auto-updater
 It is meaningless in the presence of a package manager.
Author: Sébastien Villemot <sebastien@debian.org>
Forwarded: not-needed
Last-Update: 2014-02-18
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/matlab2tikz.m
+++ b/src/matlab2tikz.m
@@ -114,7 +114,7 @@ function matlab2tikz(varargin)
     %   taking a peek at what the figure will look like. (default: false)
     %
     %   MATLAB2TIKZ('checkForUpdates',BOOL,...) determines whether to automatically
-    %   check for updates of matlab2tikz. (default: true (if not using git))
+    %   check for updates of matlab2tikz. (default: false)
     %
     %   MATLAB2TIKZ('semanticLineWidths',CELLMATRIX,...) allows you to customize
     %   the mapping of semantic "line width" values.
@@ -188,7 +188,7 @@ function matlab2tikz(varargin)
     ipp = ipp.addParamValue(ipp, 'strictFontSize', false, @islogical);
     ipp = ipp.addParamValue(ipp, 'showInfo', true, @islogical);
     ipp = ipp.addParamValue(ipp, 'showWarnings', true, @islogical);
-    ipp = ipp.addParamValue(ipp, 'checkForUpdates', isempty(VCID), @islogical);
+    ipp = ipp.addParamValue(ipp, 'checkForUpdates', false, @islogical);
 
     ipp = ipp.addParamValue(ipp, 'semanticLineWidths', NaN, @isValidSemanticLineWidthDefinition);
 
@@ -335,7 +335,8 @@ function matlab2tikz(varargin)
 
     %% Check for a new matlab2tikz version outside version control
     if m2t.args.checkForUpdates
-        m2tUpdater(m2t.about, m2t.args.showInfo);
+        warning('Auto-updater not available. Please use the package manager instead.')
+        return
     end
 
 end