| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d4fc6d9 commit 9136359
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -296,6 +296,12 @@ intl_optgroup.add_option('--download', | |||
| 296 | 296 | dest='download_list', | |
| 297 | 297 | help=nodedownload.help()) | |
| 298 | 298 | ||
| 299 | + intl_optgroup.add_option('--download-path', | ||
| 300 | + action='store', | ||
| 301 | + dest='download_path', | ||
| 302 | + default=os.path.join(root_dir, 'deps'), | ||
| 303 | + help='Download directory [default: %default]') | ||
| 304 | + | ||
| 299 | 305 | parser.add_option_group(intl_optgroup) | |
| 300 | 306 | ||
| 301 | 307 | parser.add_option('--with-perfctr', | |
@@ -844,11 +850,15 @@ def configure_intl(o): | |||
| 844 | 850 | ] | |
| 845 | 851 | def icu_download(path): | |
| 846 | 852 | # download ICU, if needed | |
| 853 | + if not os.access(options.download_path, os.W_OK): | ||
| 854 | + print 'Error: cannot write to desired download path. ' \ | ||
| 855 | + 'Either create it or verify permissions.' | ||
| 856 | + sys.exit(1) | ||
| 847 | 857 | for icu in icus: | |
| 848 | 858 | url = icu['url'] | |
| 849 | 859 | md5 = icu['md5'] | |
| 850 | 860 | local = url.split('/')[-1] | |
| 851 | - targetfile = os.path.join(root_dir, 'deps', local) | ||
| 861 | + targetfile = os.path.join(options.download_path, local) | ||
| 852 | 862 | if not os.path.isfile(targetfile): | |
| 853 | 863 | if nodedownload.candownload(auto_downloads, "icu"): | |
| 854 | 864 | nodedownload.retrievefile(url, targetfile) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments