Skip to content

Instantly share code, notes, and snippets.

@kgadek
Created July 28, 2014 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kgadek/9890fe726f539fedb791 to your computer and use it in GitHub Desktop.
Save kgadek/9890fe726f539fedb791 to your computer and use it in GitHub Desktop.
def get_fresh_flowbox():
with _section("Getting repositories"):
for repo in ["flowbox", "flowbox-env"]:
if not exists(repo):
local(_f("git clone git@github.com:wdanilo/{repo}.git"))
elif not isdir(repo):
abort(_f("path {repo} exists but does not look like a repository"))
with _section("Preparing flowbox - disabling CUDA", local_directory="flowbox"):
result = _local_withstdin("patch -u -p1 -N", patch_nocuda, noerror=True)
try:
ret, out, err = result
except Exception, e:
ret, out, err, fn = result
if ret == 1 and "Reversed (or previously applied) patch detected" in out:
print(yellow("Patch seems to be already applied"))
else:
fn()
with _section("Bootstrap", local_directory="flowbox-env"):
local("./bootstrap.py ../flowbox")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment