]> git.donarmstrong.com Git - neurodebian.git/blob - debian/neurodebian-popularity-contest.postrm
92bb35d88fc615bd3278a147dd77320a0d7ed88b
[neurodebian.git] / debian / neurodebian-popularity-contest.postrm
1 #!/bin/sh -e
2
3 #DEBHELPER#
4
5 popcon_conf=/etc/popularity-contest.conf
6 nd_popcon_conf=/etc/popularity-contest.d/neurodebian.conf
7 remove_neurodebian_popcon_pre161() {
8         # Adjust popularity-contest.conf
9         if [ -e "$popcon_conf" ] \
10            && grep -q "http://neuro.debian.net/cgi-bin/popcon-submit.cgi" $popcon_conf; then
11                 echo "Removing NeuroDebian url for Popularity Contest submissions."
12                 # First remove any explicit mentioning and then empty additions
13                 sed -i -e 's,http://neuro.debian.net/cgi-bin/popcon-submit.cgi,,g' \
14                            -e '/SUBMITURLS+=" *"/d' \
15                            -e '/SUBMITURLS="$SUBMITURLS *"/d' \
16                         "$popcon_conf"
17         fi
18 }
19
20 # If requested to be purged -- remove our entry
21 if [ "$1" = "purge" ]; then
22         remove_neurodebian_popcon_pre161
23 fi