Exemplo n.º 1
0
def gen_links(parent_dir, url):
    links = []
    https = url.replace('http://', 'https://')
    links.append(gradlemd5.get_md5b36(https))
    links.append(gradlemd5.get_md5buu(url, 32))
    links.append(gradlemd5.get_md5buu(https, 32))
    for l in links:
        gen_link(parent_dir, l)
Exemplo n.º 2
0
def copy_url(url, f):
    print url
    md5b36 = gradlemd5.get_md5b36(url)
    stem, ext = os.path.splitext(f)
    dst = fo.get_path(gradle_dist_dir % (stem, md5b36, f))
    src = fo.get_path("%s/%s" % (src_dir, f))
    parent = os.path.dirname(dst);
    if not os.path.exists(parent):
        os.makedirs(parent)
    print dst
    shutil.copyfile(src,dst)
    gen_links(parent, url)