Skip to content

Instantly share code, notes, and snippets.

@timothyclemans
Last active August 29, 2015 13:56
Show Gist options
  • Save timothyclemans/9284867 to your computer and use it in GitHub Desktop.
Save timothyclemans/9284867 to your computer and use it in GitHub Desktop.
windows installer
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