]> git.donarmstrong.com Git - roundcube.git/commitdiff
Use awk instead of sed to modify main.inc.php. Closes: #615277.
authorVincent Bernat <bernat@debian.org>
Mon, 28 Feb 2011 20:16:45 +0000 (20:16 +0000)
committerJérémy Bobbio <lunar@debian.org>
Sat, 18 Jun 2011 19:34:06 +0000 (21:34 +0200)
debian/changelog
debian/roundcube-core.postinst

index 73ad1afbcd9d41e959f75227abb95b2785264598..07164a726401fc09d106b7ca545ac180db2f1f3d 100644 (file)
@@ -1,8 +1,9 @@
 roundcube (0.5.1+dfsg-4) UNRELEASED; urgency=low
 
   * Fix debian/watch to remove "+dfsg" suffix.
+  * Use awk instead of sed to modify main.inc.php. Closes: #615277.
 
- -- Vincent Bernat <bernat@debian.org>  Sat, 19 Feb 2011 18:47:41 +0100
+ -- Vincent Bernat <bernat@debian.org>  Mon, 28 Feb 2011 21:16:16 +0100
 
 roundcube (0.5.1+dfsg-3) unstable; urgency=low
 
index 59f85f727ba009b087ba18dc6b201321ab2c2386..843a1859a9b38ea87fc4541bb1bacf1280a4112f 100644 (file)
@@ -101,9 +101,10 @@ EOF
 
        # Put hosts, language and key in main.inc.php
        cat /usr/share/roundcube/main.inc.php.dist | \
-           sed -e "s+^\(\$rcmail_config\['default_host'\] = \)''\(;\)\$+\1${hosts}\2+" \
-               -e "s+^\(\$rcmail_config\['des_key'\] = '\).*\(';\)\$+\1$deskey\2+" \
-               -e "s+^\(\$rcmail_config\['language'\] = \).*\(;\)\$+\1'${language}'\2+" >> $CONFFILE.ucftmp
+           awk "/^.rcmail_config\['default_host'\] =/ {print \$1\" = ${hosts};\" ; next}
+                 /^.rcmail_config\['des_key'\] =/ {print \$1\" = '${deskey}';\" ; next}
+                 /^.rcmail_config\['language'\] =/ {print \$1\" = '${language}';\" ; next}
+                 {print}" >> $CONFFILE.ucftmp
 
        ucf --debconf-ok $CONFFILE.ucftmp $CONFFILE
        chown root:www-data $CONFFILE