~ubuntu-branches/ubuntu/wily/octave/wily

« back to all changes in this revision

Viewing changes to scripts/pkg/private/get_forge_pkg.m

  • Committer: Package Import Robot
  • Author(s): Sébastien Villemot
  • Date: 2013-05-14 12:42:41 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20130514124241-dqow8bc0l4r3yj93
Tags: 3.6.4-2
* Adapt for Texinfo 5
  - add_info_dir_categories: use @dircategory in the patch
  - texinfo5.diff: new patch, fixes compatibility issues with Texinfo 5
* Upgrade to FLTK 1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
  name = tolower (name);
39
39
 
40
40
  ## Try to download package's index page.
41
 
  [html, succ] = urlread (sprintf ("http://octave.sourceforge.net/%s/index.html", name));
 
41
  [html, succ] = urlread (sprintf ("http://packages.octave.org/%s/index.html", name));
42
42
  if (succ)
43
43
    ## Remove blanks for simpler matching.
44
44
    html(isspace(html)) = [];
51
51
      ver = t{1}{1};
52
52
      if (nargout > 1)
53
53
        # Build download string.
54
 
        urlbase = "http://downloads.sourceforge.net/octave/%s-%s.tar.gz?download";
55
 
        url = sprintf (urlbase, name, ver);
56
 
        ## Verify that the string exists on the page.
57
 
        if (isempty (strfind (html, url)))
 
54
        pkg_file = sprintf ("%s-%s.tar.gz", name, ver);
 
55
        url = cstrcat ("http://packages.octave.org/download/", pkg_file);
 
56
        ## Verify that the package string exists on the page.
 
57
        if (isempty (strfind (html, pkg_file)))
58
58
          warning ("get_forge_pkg: download URL not verified");
59
59
        endif
60
60
      endif
61
61
    endif
62
62
  else
63
63
    ## Try get the list of all packages.
64
 
    [html, succ] = urlread ("http://octave.sourceforge.net/packages.php");
 
64
    [html, succ] = urlread ("http://packages.octave.org/packages.php");
65
65
    if (succ)
66
66
      t = regexp (html, "<div class=""package"" id=""(\\w+)"">", "tokens");
67
67
      t = horzcat (t{:});