Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: make icu download path customisable #3200

Merged
merged 1 commit into from
Oct 8, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,12 @@ intl_optgroup.add_option('--download',
dest='download_list',
help=nodedownload.help())

intl_optgroup.add_option('--download-path',
action='store',
dest='download_path',
default=os.path.join(root_dir, 'deps'),
help='Download directory [default: %default]')

parser.add_option_group(intl_optgroup)

parser.add_option('--with-perfctr',
Expand Down Expand Up @@ -844,11 +850,15 @@ def configure_intl(o):
]
def icu_download(path):
# download ICU, if needed
if not os.access(options.download_path, os.W_OK):
print 'Error: cannot write to desired download path. ' \
'Either create it or verify permissions.'
sys.exit(1)
for icu in icus:
url = icu['url']
md5 = icu['md5']
local = url.split('/')[-1]
targetfile = os.path.join(root_dir, 'deps', local)
targetfile = os.path.join(options.download_path, local)
if not os.path.isfile(targetfile):
if nodedownload.candownload(auto_downloads, "icu"):
nodedownload.retrievefile(url, targetfile)
Expand Down