blob: 92f3c2bb4c74a09146e7b08ef4e6a95ea9db6846 [file] [log] [blame]
/**
* Download a binary file from the web.
* @param link URI to download from
* @param targetLocation workspace location to store the file to
*/
function downloadLibrary(link, targetLocation) {
target = getFile(targetLocation, false);
if (!target.exists()) {
input = new java.net.URL(link).openStream();
target.create(input, true, null);
input.close();
} else
printError("target library '" + targetLocation + "' already exists.");
}