From: Yaroslav Halchenko Date: Mon, 6 Dec 2010 20:55:15 +0000 (-0500) Subject: do not spit out message about adding popcon url if already there X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4d90ed2b4ab414c77bca4273c2c35050e254c9b4;p=neurodebian.git do not spit out message about adding popcon url if already there --- 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# -