diff --git a/distribute.sh b/distribute.sh index 0bdf90ced8..37ef7b75d8 100755 --- a/distribute.sh +++ b/distribute.sh @@ -431,6 +431,15 @@ function run_get_packages() { for module in $MODULES; do # download dependencies for this module + # check if there is not an overload from environment + module_dir=$(eval "echo \$P4A_${module}_DIR") + if [ "$module_dir" ] + then + debug "\$P4A_${module}_DIR is not empty, using $module_dir dir instead of downloading" + cp -rf $module_dir $directory + directory=$(get_directory $filename) + continue + fi debug "Download package for $module" url="URL_$module" diff --git a/docs/source/usage.rst b/docs/source/usage.rst index 20b5256c27..2f27677173 100644 --- a/docs/source/usage.rst +++ b/docs/source/usage.rst @@ -19,6 +19,13 @@ You can include other modules (or "recipes") to compile using `-m`:: For a full list, refer to :ref:`recipes` +.. note:: + + Recipes download a defined version of their needed package from the + internet, and build from it, if you know what you are doing, and want to + override that, you can export the env variable `P4A_recipe_name_DIR` and + this directory will be copied and used instead. + Available options to `distribute.sh`:: -d directory Name of the distribution directory