make bild bootstrap

This commit is contained in:
Terence Parr 2014-07-09 12:00:36 -07:00
parent 08a1dc77f5
commit 065d6733ae
1 changed files with 10 additions and 3 deletions

13
bild.py
View File

@ -1,11 +1,18 @@
#!/usr/bin/env python
import sys
import os
# requires support lib:
# https://raw.githubusercontent.com/parrt/bild/master/src/python/bilder.py
sys.path.append(os.path.abspath("/Users/parrt/github/bild/src/python"))
import string
# bootstrap by downloading bilder.py if not found
import urllib
if not os.path.exists("bilder.py"):
print "bootstrapping; downloading bilder.py"
urllib.urlretrieve(
"https://raw.githubusercontent.com/parrt/bild/master/src/python/bilder.py",
"bilder.py")
# assumes bilder.py is in current directory
from bilder import *
VERSION = "4.4"