瀏覽代碼

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
   if grep -Fxq "enable_backports" $COMPLETION_FILE; then
76
   if grep -Fxq "enable_backports" $COMPLETION_FILE; then
77
 	  return
77
 	  return
78
   fi
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
   echo 'enable_backports' >> $COMPLETION_FILE
82
   echo 'enable_backports' >> $COMPLETION_FILE
81
 }
83
 }
82
 
84