Skip to content

Commit

Permalink
Changed provision_deb so it can take multiple repos (#107)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dennismartensson authored and Matt Duftler committed Jun 20, 2016
1 parent 1ec7b9c commit 7667be0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rosco-web/config/packer/install_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7667be0

Please sign in to comment.