Merge "Bash eval the lines in source-repository scripts"

This commit is contained in:
Jenkins 2014-03-10 18:55:06 +00:00 committed by Gerrit Code Review
commit e83d4dcbb2
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

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