]> git.donarmstrong.com Git - neurodebian.git/commitdiff
do not spit out message about adding popcon url if already there
authorYaroslav Halchenko <debian@onerussian.com>
Mon, 6 Dec 2010 20:55:15 +0000 (15:55 -0500)
committerYaroslav Halchenko <debian@onerussian.com>
Mon, 6 Dec 2010 20:55:15 +0000 (15:55 -0500)
debian/neurodebian-popularity-contest.postinst

index a3f9e535dc2c5479562968f2a1f1eec689374a22..4ab508134124b2e5bdea35f2f532dd3678e97ec8 100755 (executable)
@@ -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#
-