From 933da5831e3bbf633c254a1cd23c90ffc297181c Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 28 Feb 2011 20:16:45 +0000 Subject: [PATCH] Use awk instead of sed to modify main.inc.php. Closes: #615277. --- debian/changelog | 3 ++- debian/roundcube-core.postinst | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 73ad1af..07164a7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Sat, 19 Feb 2011 18:47:41 +0100 + -- Vincent Bernat Mon, 28 Feb 2011 21:16:16 +0100 roundcube (0.5.1+dfsg-3) unstable; urgency=low diff --git a/debian/roundcube-core.postinst b/debian/roundcube-core.postinst index 59f85f7..843a185 100644 --- a/debian/roundcube-core.postinst +++ b/debian/roundcube-core.postinst @@ -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 -- 2.39.2