Skip to content

allow overloading of recipe origin using env vars #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 23, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions distribute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down