Thursday, October 28, 2010 at 11:00 AM.

workspace.userlandSamples.downloadTool

on downloadTool (toolname) {
	<<Changes
		<<10/28/10; 10:44:45 AM by DW
			<<Downloads a tool via HTTP and installs it.
	local (url = "http://codecasting.org/" + toolname + "/" + toolname + ".root");
	local (filetext = tcp.httpreadurl (url));
	local (f = frontier.getsubfolder ("apps") + "Tools" + file.getpathchar () + toolname + ".root");
	file.surefilepath (f);
	file.writewholefile (f, filetext);
	frontier.tools.install (f)};
bundle { //test code
	downloadTool ("ec2Support")}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.