diff options
author | Benjamin Schlüter <bschlueter@posteo.de> | 2018-01-24 11:27:20 +0100 |
---|---|---|
committer | Benjamin Schlüter <bschlueter@posteo.de> | 2018-01-24 11:27:20 +0100 |
commit | 872f82eb54eeb11fbe89422b7927febfa8299d14 (patch) | |
tree | 3740915325028329894d88591384824f449bd689 | |
parent | a4ecc40133e02052557d4a2e2b415e49220da50f (diff) | |
download | itzks-install-script-872f82eb54eeb11fbe89422b7927febfa8299d14.tar.gz itzks-install-script-872f82eb54eeb11fbe89422b7927febfa8299d14.tar.bz2 itzks-install-script-872f82eb54eeb11fbe89422b7927febfa8299d14.zip |
itzks-installscript: Change the way itzks-repo is added. Only add file if not there. Only add lines if file empty to avoid having multiples.
-rw-r--r-- | install-itzks-workstation | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/install-itzks-workstation b/install-itzks-workstation index 50a9aa3..720f447 100644 --- a/install-itzks-workstation +++ b/install-itzks-workstation @@ -29,11 +29,29 @@ fi # Retrieve LDAP CA certificate invoke-rc.d fetch-ldap-cert start +# Alternate add itzks-package repo only if not already there +if [ -e /etc/apt/sources.list.d/itzks.list ] + then + : + else + touch /etc/apt/sources.list.d/itzks.list +fi + +# Add repos to itzks.list if empty +if [ -s /etc/apt/sources.list.d/itzks.list ] + then + : + else + echo "deb http://packages.it-zukunt-schule.de/debian stretch main contrib non-free" >> /etc/apt/sources.list.d/itzks.list + echo "deb http://packages.it-zukunft-schule.de/debian stretch-backports main contrib non-free" >> /etc/apt/sources.list.d/itzks.list + echo "deb http://packages.it-zukunft-schuke.de/debian sid main contrib non-free" >> /etc/apt/sources.list.d/itzks.list +fi + # Add itzks-package repo -touch /etc/apt/sources.list.d/itzks.list -echo "deb http://packages.it-zukunft-schule.de/debian stretch main contrib non-free" >> /etc/apt/sources.list.d/itzks.list -echo "deb http://packages.it-zukunft-schule.de/debian stretch-backports main contrib non-free" >> /etc/apt/sources.list.d/itzks.list -echo "deb http://packages.it-zukunft-schule.de/debian sid main contrib non-free" >> /etc/apt/sources.list.d/itzks.list +# touch /etc/apt/sources.list.d/itzks.list +# echo "deb http://packages.it-zukunft-schule.de/debian stretch main contrib non-free" >> /etc/apt/sources.list.d/itzks.list +# echo "deb http://packages.it-zukunft-schule.de/debian stretch-backports main contrib non-free" >> /etc/apt/sources.list.d/itzks.list +# echo "deb http://packages.it-zukunft-schule.de/debian sid main contrib non-free" >> /etc/apt/sources.list.d/itzks.list # Export proxy-settings for first install export http_proxy=http://webcache:3128 |