Fetching files from cvs



Here is a simple function to get files from the maxima cvs. We assume
that wget is installed somewhere and use viewvc gateway to sourceforge
cvs.

/* http link */
viewvc: "http://maxima.cvs.sourceforge.net/viewvc/*checkout*/maxima/maxima/"$

/* where to put the file */
cvsfiles: "/Users/andrej/Desktop/cvs/"$

/* wget program */
wget: "wget"$

fetch_from_cvs(filename) := block(
    [cvsfilename: concat(viewvc, filename),
     localfilename: concat(cvsfiles, filename)],
    ?ensure\-directories\-exist(localfilename),
    system(wget, " ", cvsfilename, " -o ", localfilename),
    localfilename)$

fetch_from_cvs("share/contrib/to_poly_solver.mac")$

will download to_poly_solver.mac from and return the path to the
downloaded file.

If we are serious about updating files from cvs this could be a very
simple option. fetch_from_cvs could also be used for some more
complicated scheme if we need it. We should also include wget with the
windows binary but this is not a problem.

Andrej