| Index: infra/bots/assets/go/create.py
|
| diff --git a/infra/bots/assets/scripts/create.py b/infra/bots/assets/go/create.py
|
| similarity index 58%
|
| copy from infra/bots/assets/scripts/create.py
|
| copy to infra/bots/assets/go/create.py
|
| index 4f176085fbde447b9e5dca925f6c5e47fee08ef7..6ea94147e5043c458ab96a5b40841a37b4448b7e 100755
|
| --- a/infra/bots/assets/scripts/create.py
|
| +++ b/infra/bots/assets/go/create.py
|
| @@ -10,11 +10,16 @@
|
|
|
|
|
| import argparse
|
| +import subprocess
|
|
|
| +GO_URL = "https://storage.googleapis.com/golang/go1.6.3.linux-amd64.tar.gz"
|
|
|
| def create_asset(target_dir):
|
| """Create the asset."""
|
| - raise NotImplementedError('Implement me!')
|
| + p1 = subprocess.Popen(["curl", GO_URL], stdout=subprocess.PIPE)
|
| + p2 = subprocess.Popen(["tar", "-C", target_dir, "-xzf" "-"], stdin=p1.stdout)
|
| + p1.stdout.close() # Allow p1 to receive a SIGPIPE if p2 exits.
|
| + _,_ = p2.communicate()
|
|
|
|
|
| def main():
|
|
|