Last active
August 29, 2015 13:56
-
-
Save timothyclemans/9284867 to your computer and use it in GitHub Desktop.
windows installer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import urllib | |
user_profile = os.environ['USERPROFILE'] | |
urls = ['https://github.com/OpenShades/wearscript/raw/dev/thirdparty/adb/windows/AdbWinApi.dll', 'https://github.com/OpenShades/wearscript/raw/dev/thirdparty/adb/windows/AdbWinUsbApi.dll', 'https://github.com/OpenShades/wearscript/raw/dev/thirdparty/adb/windows/adb.exe'] | |
for url in urls: | |
print os.path.join(user_profile, re.search('(?P<filename>\w+\.[de][lx][le])', url).groups()[0]) | |
urllib.urlretrieve(url, os.path.join(user_profile, re.search('(?P<filename>\w+\.[de][lx][le])', url).groups()[0])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment