improve awk snippet to only remove first and last double quotation
authorgregor herrmann <gregoa@debian.org>
Fri, 11 Feb 2011 14:08:53 +0000 (14:08 -0000)
committergregor herrmann <gregoa@debian.org>
Fri, 11 Feb 2011 14:08:53 +0000 (14:08 -0000)
debian/config

index 9ee98564fb9579704cc8e72f728e3941fa416437..c7f05444da9fbdd5ac31e064055e9273a15ceca5 100644 (file)
@@ -5,7 +5,7 @@ set -e
 . /usr/share/debconf/confmodule
 
 getvalue() {
-       awk '/^'"$1"'=/ {gsub("\"", ""); sub("'"$1"'=", ""); value=$0;} END {print value}' /etc/default/iodine
+       awk '/^'"$1"'=/ {sub("^'"$1"'=\"", ""); sub("\"$", ""); value=$0;} END {print value}' /etc/default/iodine
 }
 
 if [ -s /etc/default/iodine ] ; then