Avoid duplicated entries in sources.list

This commit is contained in:
Bob Mottram 2014-09-21 11:54:23 +01:00
parent b594ff9699
commit 7cb02e025b
1 changed files with 3 additions and 1 deletions

View File

@ -76,7 +76,9 @@ function enable_backports {
if grep -Fxq "enable_backports" $COMPLETION_FILE; then if grep -Fxq "enable_backports" $COMPLETION_FILE; then
return return
fi fi
echo "deb http://ftp.us.debian.org/debian jessie-backports main" >> /etc/apt/sources.list if ! grep -Fxq "deb http://ftp.us.debian.org/debian jessie-backports main" /etc/apt/sources.list; then
echo "deb http://ftp.us.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
fi
echo 'enable_backports' >> $COMPLETION_FILE echo 'enable_backports' >> $COMPLETION_FILE
} }