2010-01-04 22:36:58 +03:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
use warnings;
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
=head1 convert_build_config_to_shell_format
|
|
|
|
|
|
|
|
This simple script converts its standard input from the jam-specific format
|
|
|
|
that is being used in BuildSetup into a format that's understood by sh.
|
|
|
|
|
|
|
|
=cut
|
|
|
|
|
|
|
|
my $data;
|
|
|
|
while (my $line = <>) {
|
|
|
|
$data .= $line;
|
2010-01-05 11:59:10 +03:00
|
|
|
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";
|
2010-01-04 22:36:58 +03:00
|
|
|
$data = '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|