浏览代码

Avoid duplicated entries in sources.list

Bob Mottram 10 年前
父节点
当前提交
7cb02e025b
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      install-freedombone.sh

+ 3
- 1
install-freedombone.sh 查看文件

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