diff --git a/dev/list-rdeps.sh b/dev/list-rdeps.sh index e808a19..1344b70 100755 --- a/dev/list-rdeps.sh +++ b/dev/list-rdeps.sh @@ -11,8 +11,12 @@ ARCHIVE="${ARCHIVE:-unstable}" ARCHIVT="${ARCHIVT:-testing}" -if ! grep "$ARCHIVE" -qR /etc/apt/sources.list /etc/apt/sources.list.d/ || \ - ! grep "$ARCHIVT" -qR /etc/apt/sources.list /etc/apt/sources.list.d/; then +grep_sources_entry() { + grep '^deb[^#]*://[^#[:space:]]*[[:space:]]*'"$@" +} + +if ! grep_sources_entry "$ARCHIVE" -qR /etc/apt/sources.list /etc/apt/sources.list.d/ || \ + ! grep_sources_entry "$ARCHIVT" -qR /etc/apt/sources.list /etc/apt/sources.list.d/; then cat <<-eof To make this script work, you will need Debian Testing *AND* Debian Unstable in your sources.list. If you want your system to prefer Debian Testing, be