def download_box(pname):
"just download the vagrant .box for given project"
boxurl = box_url(pname)
if not boxurl.startswith('s3://'):
print 'this task only downloads from s3. unhandled url', boxurl
exit(1)
dest = join('/tmp', os.path.basename(boxurl))
if os.path.exists(dest):
print 'file %s already exists, skipping download. move or rename the file to re-download' % dest
return dest
cmd = "aws s3 cp %s %s" % (boxurl, dest)
assert local(cmd).return_code == 0, "failed to successfully download %s" % boxurl
return dest
评论列表
文章目录