2004-09-24  Danilo Šegan  <dsegan@gmx.net>

	* intltool-update.in.in (GeneratePOTemplate): Bork out if we
	cannot write POTFILES.in.temp.

	* intltool-update.in.in (SubstituteVariable): Fix typo in re: s/$1)/$1/
	(variables with quotes got ")" attached previously); use shell
	escaping (`echo -n "$str"`).

Index: intltool-update.in.in
===================================================================
RCS file: /cvs/gnome/intltool/intltool-update.in.in,v
retrieving revision 1.109
diff -u -r1.109 intltool-update.in.in
--- intltool-update.in.in	22 Aug 2004 19:01:54 -0000	1.109
+++ intltool-update.in.in	24 Sep 2004 16:23:05 -0000
@@ -597,7 +597,7 @@
 
     open INFILE, $POTFILES_in;
     unlink "POTFILES.in.temp";
-    open OUTFILE, ">POTFILES.in.temp";
+    open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing");
 
     my $gettext_support_nonascii = 0;
 
@@ -833,7 +833,7 @@
     {
 	if (/^(\w+)=(.*)$/)
 	{
-	    ($varhash{$1} = $2) =~  s/^["'](.*)["']$/$1)/;
+	    ($varhash{$1} = $2) =~  s/^["'](.*)["']$/$1/;
 	}
     }
     
@@ -845,7 +845,8 @@
 	
 	return SubstituteVariable ("$untouched$sub$rest");
     }
-    return $str;
+    
+    return `echo -n "$str"`;
 }
 
 sub CONF_Handle_Open
