diff options
author | Wadim Egorov <w.egorov@phytec.de> | 2020-10-16 13:17:49 +0200 |
---|---|---|
committer | Stefan Müller-Klieser <s.mueller-klieser@phytec.de> | 2020-10-29 13:10:57 +0100 |
commit | 937ee26f3725f9459944470d6fb7db23d6d42440 (patch) | |
tree | 50d70efe539c854323dcded36a94d64c9b6b8611 | |
parent | 76ee4e1422e3005dc4053f3cca4444bef9de067a (diff) | |
download | meta-phytec-937ee26f3725f9459944470d6fb7db23d6d42440.tar.bz2 meta-phytec-937ee26f3725f9459944470d6fb7db23d6d42440.zip |
scripts: init: Add container usage messagerocko
Provide information for container based builds and work environments.
Additional container information is only printed if 'build_container'
attribute is set in the manifest file.
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
-rwxr-xr-x | scripts/init | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/init b/scripts/init index 29c23ba..3bde6f2 100755 --- a/scripts/init +++ b/scripts/init @@ -69,6 +69,20 @@ ${PHYTEC_DIR}/scripts/init_bblayers.py ${PHYTEC_DIR}/scripts/copy_site_conf.py ${PHYTEC_DIR}/scripts/init_machine.py +container_usage() { + CONTAINER=$(sed -n 's:.*build_container="\([^"]*\).*:\1:p' ${ROOTDIR}/.repo/manifest.xml) + if [ ! -z "${CONTAINER}" ]; then + echo "A docker image can also be used as your build environment.\n" + echo "Set up your shell environment with:\n" + echo " $ docker run --rm -it -v \${PWD}:/\${PWD} ${CONTAINER} --workdir=\${PWD} bash\n" + echo "Or start a build with:\n" + echo " $ docker run --rm -it -v \${PWD}:/\${PWD} ${CONTAINER} --workdir=\${PWD} \\" + echo " bash -c '. sources/poky/oe-init-build-env && bitbake phytec-headless-image'" + echo "" + echo "" + fi +} + echo "" echo "Before you start your work, please check your build/conf/local.conf for" echo "host specific configuration. Check the documentation especially for:" @@ -82,3 +96,4 @@ echo "" echo " $ . sources/poky/oe-init-build-env" echo "" echo "" +container_usage |