Mercurial > hg > octave-lyh
diff scripts/pkg/private/get_forge_pkg.m @ 15966:d56dd6794a20
maint: periodic merge of stable to default
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 18 Jan 2013 16:48:12 -0500 |
parents | 5d3a684236b0 7ad3eea8a3af |
children | 333243133364 |
line wrap: on
line diff
--- a/scripts/pkg/private/get_forge_pkg.m +++ b/scripts/pkg/private/get_forge_pkg.m @@ -39,7 +39,7 @@ name = tolower (name); ## Try to download package's index page. - [html, succ] = urlread (sprintf ("http://octave.sourceforge.net/%s/index.html", name)); + [html, succ] = urlread (sprintf ("http://packages.octave.org/%s/index.html", name)); if (succ) ## Remove blanks for simpler matching. html(isspace(html)) = []; @@ -52,17 +52,17 @@ ver = t{1}{1}; if (nargout > 1) # Build download string. - urlbase = "http://downloads.sourceforge.net/octave/%s-%s.tar.gz?download"; - url = sprintf (urlbase, name, ver); - ## Verify that the string exists on the page. - if (isempty (strfind (html, url))) + pkg_file = sprintf ("%s-%s.tar.gz", name, ver); + url = cstrcat ("http://packages.octave.org/download/", pkg_file); + ## Verify that the package string exists on the page. + if (isempty (strfind (html, pkg_file))) warning ("get_forge_pkg: download URL not verified"); endif endif endif else ## Try get the list of all packages. - [html, succ] = urlread ("http://octave.sourceforge.net/packages.php"); + [html, succ] = urlread ("http://packages.octave.org/packages.php"); if (succ) t = regexp (html, "<div class=""package"" id=""(\\w+)"">", "tokens"); t = horzcat (t{:});