From 8012fdba5b6c4c0407f9cfd1d90c1d8b4b3b63f7 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Thu, 14 Sep 2017 14:55:50 +0000 Subject: source-bundle: Allow installing to somewhere other than / 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. --- buildstream/data/build-module.sh.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- cgit v1.2.1