From b2d3f03b4c279fe18f632f31458cfd0bac7dec37 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 12 Feb 2016 10:11:16 +0000 Subject: [PATCH] Only add source if doesnt already exist --- apt/add-apt-sources.sh | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/apt/add-apt-sources.sh b/apt/add-apt-sources.sh index bfac3c3..8706085 100755 --- a/apt/add-apt-sources.sh +++ b/apt/add-apt-sources.sh @@ -1,6 +1,21 @@ #!/usr/bin/env bash -echo "deb http://downloads.hipchat.com/linux/apt stable main" > /etc/apt/sources.list.d/atlassian-hipchat.list -echo "deb http://apt.insynchq.com/ubuntu wily non-free contrib" > /etc/apt/sources.list.d/insync.list -echo "deb http://download.virtualbox.org/virtualbox/debian wily contrib" > /etc/apt/sources.list.d/virtualbox.list -echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_15.10/ /' >> /etc/apt/sources.list.d/owncloud-client.list + +if [ -a /etc/apt/sources.list.d/atlassian-hipchat.list ]; then + echo "deb http://downloads.hipchat.com/linux/apt stable main" >> /etc/apt/sources.list.d/atlassian-hipchat.list +fi + + +if [ -a /etc/apt/sources.list.d/insync.list ]; then + echo "deb http://apt.insynchq.com/ubuntu wily non-free contrib" >> /etc/apt/sources.list.d/insync.list +fi + + +if [ -a /etc/apt/sources.list.d/virtualbox.list ]; then + echo "deb http://download.virtualbox.org/virtualbox/debian wily contrib" >> /etc/apt/sources.list.d/virtualbox.list +if + + +if [ -a /etc/apt/sources.list.d/owncloud-client.list ]; then + echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_15.10/ /' >> /etc/apt/sources.list.d/owncloud-client.list +fi