From 451d7b2543e63ebf84df070b9b34c59a63098e69 Mon Sep 17 00:00:00 2001 From: tshirtman Date: Mon, 1 Apr 2013 23:26:57 +0200 Subject: [PATCH 1/2] allow overloading of recipe origin using env vars --- distribute.sh | 8 ++++++++ docs/source/usage.rst | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/distribute.sh b/distribute.sh index 0bdf90ced8..03d7a28d98 100755 --- a/distribute.sh +++ b/distribute.sh @@ -431,6 +431,14 @@ 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 + 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 From f7a1d29730415ea3cf4d3787dbdabc0bc4c4f511 Mon Sep 17 00:00:00 2001 From: tshirtman Date: Tue, 2 Apr 2013 00:23:52 +0200 Subject: [PATCH 2/2] fix destination directory when overriding --- distribute.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/distribute.sh b/distribute.sh index 03d7a28d98..37ef7b75d8 100755 --- a/distribute.sh +++ b/distribute.sh @@ -437,6 +437,7 @@ function run_get_packages() { 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"