[haiku-commits] r34903 - haiku/trunk/build/scripts

  • From: zooey@xxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 5 Jan 2010 09:59:10 +0100 (CET)

Author: zooey
Date: 2010-01-05 09:59:10 +0100 (Tue, 05 Jan 2010)
New Revision: 34903
Changeset: http://dev.haiku-os.org/changeset/34903/haiku

Modified:
   haiku/trunk/build/scripts/convert_build_config_to_shell_format.pl
Log:
* handle the fact gracefully that some of our BuildSetup jam variables contain
  '+' as part of their name, which is illegal for shell variables (where the
  corresponding replacement character is 'X'). 


Modified: haiku/trunk/build/scripts/convert_build_config_to_shell_format.pl
===================================================================
--- haiku/trunk/build/scripts/convert_build_config_to_shell_format.pl   
2010-01-04 22:59:18 UTC (rev 34902)
+++ haiku/trunk/build/scripts/convert_build_config_to_shell_format.pl   
2010-01-05 08:59:10 UTC (rev 34903)
@@ -13,8 +13,10 @@
 my $data;
 while (my $line = <>) {
        $data .= $line;
-       if ($data =~ m{\s*(\w+)\s*\?=\s*\"?([^;]*?)\"?\s*;}gms) {
-               print "$1='$2'\n";
+       if ($data =~ m{\s*([+\w]+)\s*\?=\s*\"?([^;]*?)\"?\s*;}gms) {
+               my ($variable, $value) = ($1, $2);
+               $variable =~ tr{+}{X};  # '+' is illegal as part of shell 
variable
+               print "$variable='$value'\n";
                $data = '';
        }
 }


Other related posts:

  • » [haiku-commits] r34903 - haiku/trunk/build/scripts - zooey