summaryrefslogtreecommitdiff
path: root/buildstream
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-12-05 12:43:04 -0500
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-12-05 14:48:57 -0500
commit3c3cd886b98366feb6ed011f0c3adbe33000136e (patch)
treee5f43315ae7694a4cb792769914e4302ff69be70 /buildstream
parentd676745a9b5d9234030158a0899be5492f890bb5 (diff)
downloadbuildstream-3c3cd886b98366feb6ed011f0c3adbe33000136e.tar.gz
_frontend/main.py: Adding --hardlinks option to `bst checkout`
This fixes #162
Diffstat (limited to 'buildstream')
-rw-r--r--buildstream/_frontend/main.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/buildstream/_frontend/main.py b/buildstream/_frontend/main.py
index d70645887..e14c53eaf 100644
--- a/buildstream/_frontend/main.py
+++ b/buildstream/_frontend/main.py
@@ -512,16 +512,18 @@ def shell(app, element, sysroot, build, command):
help="Overwrite files existing in checkout directory")
@click.option('--integrate/--no-integrate', default=True, is_flag=True,
help="Whether to run integration commands")
+@click.option('--hardlinks', default=False, is_flag=True,
+ help="Checkout hardlinks instead of copies (handle with care)")
@click.argument('element',
type=click.Path(dir_okay=False, readable=True))
@click.argument('directory', type=click.Path(file_okay=False))
@click.pass_obj
-def checkout(app, element, directory, force, integrate):
+def checkout(app, element, directory, force, integrate, hardlinks):
"""Checkout a built artifact to the specified directory
"""
app.initialize((element,))
try:
- app.pipeline.checkout(directory, force, integrate)
+ app.pipeline.checkout(directory, force, integrate, hardlinks)
click.echo("")
except BstError as e:
click.echo("")