diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-09-14 14:55:50 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-09-14 14:55:50 +0000 |
commit | 8012fdba5b6c4c0407f9cfd1d90c1d8b4b3b63f7 (patch) | |
tree | 0c4807dee484b772f233951bfff774f097618faa | |
parent | 5b995dd1543b9476abfe6f1d42dc43cd5d0ea7dc (diff) | |
download | buildstream-sam/source-bundle-destdir.tar.gz |
source-bundle: Allow installing to somewhere other than /sam/source-bundle-destdir
You can now set BUILDSTREAM_DESTDIR in the environment to cause the
results of the source-bundle build to be collected into that directory,
instead of the default of the root directory (`/`). This makes it
eaiser to collect up the results of a build cleanly.
If elements in the source bundle depend on each other to build, then
they need to be installed to `/`, or else extra care needs to be taken
to set variables such as PATH during the build.
-rw-r--r-- | buildstream/data/build-module.sh.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/buildstream/data/build-module.sh.in b/buildstream/data/build-module.sh.in index d67ee9a9e..92cf2b4df 100644 --- a/buildstream/data/build-module.sh.in +++ b/buildstream/data/build-module.sh.in @@ -38,4 +38,8 @@ rm -rf '{build_root}' # Install the module echo 'Installing {name}' -(cd '{install_root}'; find . | cpio -umdp /) +if [ -z "$BUILDSTREAM_DESTDIR" ]; then + BUILDSTREAM_DESTDIR=/ +fi + +(cd '{install_root}'; find . | cpio -umdp $BUILDSTREAM_DESTDIR) |