From fbb3d94f4638063ecbccdbb307d13dae7574bb7d Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Tue, 5 Jan 2010 08:59:10 +0000 Subject: [PATCH] * 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'). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34903 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/scripts/convert_build_config_to_shell_format.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/scripts/convert_build_config_to_shell_format.pl b/build/scripts/convert_build_config_to_shell_format.pl index c247899b95..5ae62f19d8 100644 --- a/build/scripts/convert_build_config_to_shell_format.pl +++ b/build/scripts/convert_build_config_to_shell_format.pl @@ -13,8 +13,10 @@ that is being used in BuildSetup into a format that's understood by sh. 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 = ''; } }