@task
@runs_once  # do this once, locally
def compile_redis():
    "Compile redis locally"
    tempdir = tempfile.mkdtemp()
    try:
        os.remove('redis-server')
    except __HOLE__:
        pass
    try:
        os.remove('redis-cli')
    except OSError:
        pass

    with lcd(tempdir):
        local('wget https://github.com/antirez/redis/archive/2.6.16.tar.gz '
              '-O -| tar xz --strip 1')
        local('make')
        #local('make test')  # takes a long time
    shutil.move(os.path.join(tempdir, 'src/redis-server'),
                '.')
    shutil.move(os.path.join(tempdir, 'src/redis-cli'),
                '.')
    shutil.rmtree(tempdir)
dataset/ETHPy150Open PaulMcMillan/toorcon_2013/configurator/fabfile/master.py/compile_redis