From 4d90ed2b4ab414c77bca4273c2c35050e254c9b4 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 6 Dec 2010 15:55:15 -0500 Subject: [PATCH] do not spit out message about adding popcon url if already there --- debian/neurodebian-popularity-contest.postinst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/debian/neurodebian-popularity-contest.postinst b/debian/neurodebian-popularity-contest.postinst index a3f9e53..4ab5081 100755 --- a/debian/neurodebian-popularity-contest.postinst +++ b/debian/neurodebian-popularity-contest.postinst @@ -3,12 +3,10 @@ popcon_conf=/etc/popularity-contest.conf if [ "$1" = "configure" -o "$1" = "abort-upgrade" ]; then # Adjust popularity-contest.conf - if [ -e "$popcon_conf" ]; then + if [ -e "$popcon_conf" ] && ! grep -q 'SUBMITURLS.*neuro.debian.net' "$popcon_conf"; then echo "Adding NeuroDebian url for Popularity Contest submissions." - grep -q 'SUBMITURLS.*neuro.debian.net' "$popcon_conf" || \ - echo -e 'SUBMITURLS+=" http://neuro.debian.net/cgi-bin/popcon-submit.cgi"' >> "$popcon_conf" + echo -e 'SUBMITURLS+=" http://neuro.debian.net/cgi-bin/popcon-submit.cgi"' >> "$popcon_conf" fi fi #DEBHELPER# - -- 2.39.5