summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2017-09-14 14:55:50 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2017-09-14 14:55:50 +0000
commit8012fdba5b6c4c0407f9cfd1d90c1d8b4b3b63f7 (patch)
tree0c4807dee484b772f233951bfff774f097618faa
parent5b995dd1543b9476abfe6f1d42dc43cd5d0ea7dc (diff)
downloadbuildstream-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.in6
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)