### 5.1.10. `oe-init-build-env`

This script sets up the OpenEmbedded build environment. Running this script with the `source` command in a shell makes changes to `PATH` and sets other core BitBake variables based on the current working directory. You need to run this script before running BitBake commands. The script uses other scripts within the `scripts` directory to do the bulk of the work.

By default, running this script without a Build Directory argument creates the `build` directory. If you provide a Build Directory argument when you `source` the script, you direct OpenEmbedded build system to create a Build Directory of your choice. For example, the following command creates a Build Directory named `mybuilds` that is outside of the Source Directory:

         $ source oe-init-build-env ~/mybuilds

### Note

The OpenEmbedded build system does not support file or directory names that contain spaces. If you attempt to run the `oe-init-build-env` script from a Source Directory that contains spaces in either the filenames or directory names, the script returns an error indicating no such file or directory. Be sure to use a Source Directory free of names containing spaces.