diff options
Diffstat (limited to 'scripts/common')
-rw-r--r-- | scripts/common | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/common b/scripts/common index cd9d874cf7..c68a80fd74 100644 --- a/scripts/common +++ b/scripts/common @@ -156,15 +156,16 @@ EOF } # Generate a repositories file with all allowed repositories in our build environment. -# Takes one optional argument, the private repository URL. +# Takes a variable number of additional repositories as argument. # See http://www.scala-sbt.org/0.13/docs/Proxy-Repositories.html function generateRepositoriesConfig() { jcenterCacheUrl=${jcenterCacheUrl-"https://scala-ci.typesafe.com/artifactory/jcenter/"} sbtRepositoryConfig="$scriptsDir/sbt-repositories-config" echo > "$sbtRepositoryConfig" '[repositories]' - if [ -n "$1" ] - then - echo >> "$sbtRepositoryConfig" " private-repo: $1" + if [[ $# -gt 0 ]]; then + for i in $(seq 1 $#); do + echo >> "$sbtRepositoryConfig" " script-repo-$i: ${!i}" + done fi cat >> "$sbtRepositoryConfig" << EOF jcenter-cache: $jcenterCacheUrl |