1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

Update readme and fix tool paths

This commit is contained in:
Ivan Grokhotkov
2015-10-30 01:58:56 +03:00
parent 90fc4f975b
commit a631269f3c
3 changed files with 34 additions and 9 deletions

View File

@ -6,6 +6,7 @@
from __future__ import print_function
import urllib
import os
import errno
import os.path
import hashlib
import json
@ -24,6 +25,13 @@ def sha256sum(filename, blocksize=65536):
hash.update(block)
return hash.hexdigest()
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc:
if exc.errno != errno.EEXIST or not os.path.isdir(path):
raise
def report_progress(count, blockSize, totalSize):
percent = int(count*blockSize*100/totalSize)
percent = min(100, percent)
@ -90,5 +98,6 @@ def identify_platform():
if __name__ == '__main__':
print('Platform: {0}'.format(identify_platform()))
tools_to_download = load_tools_list('tools.json', identify_platform())
mkdir_p(dist_dir)
for tool in tools_to_download:
get_tool(tool)