]> git.donarmstrong.com Git - neurodebian.git/commitdiff
Fixing bashism in popcon post-scripts -- no "+=" operator
authorYaroslav Halchenko <debian@onerussian.com>
Tue, 7 Dec 2010 13:49:08 +0000 (08:49 -0500)
committerYaroslav Halchenko <debian@onerussian.com>
Tue, 7 Dec 2010 13:52:32 +0000 (08:52 -0500)
debian/changelog
debian/neurodebian-popularity-contest.postinst
debian/neurodebian-popularity-contest.postrm

index 7b457145999d3d26fdc2f9926369abf4644ac3df..4f0e472f4c53ec6aea968e3c54b5181bbde082aa 100644 (file)
@@ -1,3 +1,9 @@
+neurodebian (0.21) unstable; urgency=low
+
+  * Fixing bashism in popcon post-scripts -- no "+=" operator
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Tue, 07 Dec 2010 08:48:53 -0500
+
 neurodebian (0.20) unstable; urgency=low
 
   * New package neurodebian-popularity-contest, which all backported
index 4ab508134124b2e5bdea35f2f532dd3678e97ec8..3bb1437090d96622a741aa615d0fc40ca9a0f283 100755 (executable)
@@ -3,9 +3,16 @@
 popcon_conf=/etc/popularity-contest.conf
 if [ "$1" = "configure" -o "$1" = "abort-upgrade" ]; then
        # Adjust popularity-contest.conf
-       if [ -e "$popcon_conf" ] && ! grep -q 'SUBMITURLS.*neuro.debian.net' "$popcon_conf"; then
-               echo "Adding NeuroDebian url for Popularity Contest submissions."
-               echo -e 'SUBMITURLS+=" http://neuro.debian.net/cgi-bin/popcon-submit.cgi"' >> "$popcon_conf"
+       if [ -e "$popcon_conf" ]; then
+               # Fix dashism missing += operator
+               if grep -q 'SUBMITURLS+="' "$popcon_conf"; then
+                       echo "Adjusting addition of new entries in $popcon_conf for dash."
+                       sed -i -e 's,SUBMITURLS+=",SUBMITURLS="$SUBMITURLS,g' "$popcon_conf"
+               fi
+               if ! grep -q 'SUBMITURLS.*neuro.debian.net' "$popcon_conf"; then
+                       echo "Adding NeuroDebian url for Popularity Contest submissions."
+                       echo -e 'SUBMITURLS="$SUBMITURLS http://neuro.debian.net/cgi-bin/popcon-submit.cgi"' >> "$popcon_conf"
+               fi
        fi
 fi
 
index b392f7bfb28416d0c1e38094bcdc56485db8016e..6615555b99f81749e61ae8bc544a63d76919a093 100755 (executable)
@@ -10,7 +10,8 @@ if [ "$1" = "purge" ]; then
                echo "Removing NeuroDebian url for Popularity Contest submissions."
                # First remove any explicit mentioning and then empty additions
                sed -i -e 's,http://neuro.debian.net/cgi-bin/popcon-submit.cgi,,g' \
-                          -e '/SUBMITURLS+=" *"/d'\
+                          -e '/SUBMITURLS+=" *"/d' \
+                          -e '/SUBMITURLS="$SUBMITURLS *"/d' \
                        "$popcon_conf"
        fi
 fi