diff options
author | Trevor Woerner <trevor.woerner@linaro.org> | 2015-02-20 14:57:48 -0500 |
---|---|---|
committer | Trevor Woerner <trevor.woerner@linaro.org> | 2015-02-24 17:40:30 -0500 |
commit | 5cc0ac1594f064b8338751e05a745c111a11924a (patch) | |
tree | db4d48b146c3cd10935a95f924993348c6e76c68 | |
parent | 91de56de929112edc181421cc9ac93eea3cc49b8 (diff) |
functions.sh: hook for local download directory
If the user defines the environment variable "LOCALDLDIR" before calling
init-and-build.sh, conf/site.conf will have a DL_DIR variable added to it
defined as the string in $LOCALDLDIR.
This allows a user to specify a local, pre-existing download directory to use
when performing local OE builds instead of having a separate download area for
each such build.
Change-Id: I7e116e153da898d27ba2b2bb62d5858ab3c97fc3
Signed-off-by: Trevor Woerner <trevor.woerner@linaro.org>
-rwxr-xr-x | functions.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/functions.sh b/functions.sh index 462d6bd..0df7cf1 100755 --- a/functions.sh +++ b/functions.sh @@ -24,6 +24,7 @@ show_setup() echo "Manifest groups: $manifest_groups" echo "Init env: $init_env" echo "Verbose: $bitbake_verbose" + echo "Local download directory: $LOCALDLDIR" if [ $external_url ]; then echo "External toolchain URL: $external_url" @@ -176,6 +177,15 @@ fi # enable a distro feature that is compatible with the minimal goal we have echo 'DISTRO_FEATURES = "pam x11 alsa argp ext2 largefile usbgadget usbhost xattr nfs zeroconf opengl ${DISTRO_FEATURES_LIBC} ${DISTRO_FEATURES_INITMAN}"' >>conf/site.conf + +# allow the user to specify a local, pre-existing download directory +if [ -n "$LOCALDLDIR" ]; then + cat >> conf/site.conf <<EOF + +# use a pre-existing download directory +DL_DIR = "$LOCALDLDIR" +EOF +fi } conf_toolchain() |