Bash eval the lines in source-repository scripts

This will allow us to add environment variables to source-repository
scripts. Useful for things like arch-specific download urls.

Change-Id: I4d046825a317dc88db3d7673ad261cedacd1a104
This commit is contained in:
Gregory Haynes 2014-02-24 16:29:24 -08:00
parent 6360b46229
commit 6a6d913459
2 changed files with 6 additions and 1 deletions

View File

@ -36,6 +36,9 @@ fetch/pull section of a review. For example:
DIB_REPOLOCATION_nova=https://review.openstack.org/openstack/nova
DIB_REPOREF_nova=refs/changes/72/61972/8
Additionally, the lines in the source-repository scripts are eval'd, so they
may contain environment variables.
Git sources will be cloned to \<destination\>
Tarballs will be extracted to \<destination\>. Tarballs should contain a

View File

@ -13,6 +13,8 @@ function get_repos_for_element(){
local REGEX="^([^ ]+) (git|tar|file|package) ?(/[^ ]+)? ?([^ ]+)? ?([^ ]*)$"
while read line; do
# expand variables
line=$(eval echo $line)
# ignore blank lines and lines beginning in '#'
[[ "$line" == \#* ]] || [[ -z "$line" ]] && continue