From 7667be04c5f876ba85e99465003aa882a58e0faf Mon Sep 17 00:00:00 2001 From: Dennis Date: Mon, 20 Jun 2016 18:58:05 +0200 Subject: [PATCH] Changed provision_deb so it can take multiple repos (#107) Have change the provision_deb functions so it loops over $repository split on ; This makes it possible to set more the one deb repo in debianRepository and have them all added. I did split the settings string on ; with to my knowledge is a non valid character for the urls and there by safe as a character to split on. Please add comments. --- rosco-web/config/packer/install_packages.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rosco-web/config/packer/install_packages.sh b/rosco-web/config/packer/install_packages.sh index b54f4fa09..9d5b35fbc 100755 --- a/rosco-web/config/packer/install_packages.sh +++ b/rosco-web/config/packer/install_packages.sh @@ -27,7 +27,10 @@ function provision_deb() { fi if [[ "$repository" != "" ]]; then - echo "deb $repository" | sudo tee /etc/apt/sources.list.d/spinnaker.list > /dev/null + IFS=';' read -ra repo <<< "$repository" + for i in "${repo[@]}"; do + echo "deb $i" | sudo tee -a /etc/apt/sources.list.d/spinnaker.list > /dev/null + done fi sudo apt-get update