sugar 'option'; see below
option foo = bar -> config gitolite-options.foo = bar
This commit is contained in:
parent
379b0c9549
commit
a0305ec029
|
@ -45,12 +45,30 @@ sub sugar {
|
||||||
|
|
||||||
# then our stuff:
|
# then our stuff:
|
||||||
|
|
||||||
|
$lines = option($lines);
|
||||||
$lines = owner_desc($lines);
|
$lines = owner_desc($lines);
|
||||||
# $lines = name_vref($lines);
|
# $lines = name_vref($lines);
|
||||||
|
|
||||||
return $lines;
|
return $lines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub option {
|
||||||
|
my $lines = shift;
|
||||||
|
my @ret;
|
||||||
|
|
||||||
|
# option foo = bar
|
||||||
|
# -> config gitolite-options.foo = bar
|
||||||
|
|
||||||
|
for my $line (@$lines) {
|
||||||
|
if ( $line =~ /^option (\S+) = (\S.*)/ ) {
|
||||||
|
push @ret, "config gitolite-options.$1 = $2";
|
||||||
|
} else {
|
||||||
|
push @ret, $line;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return \@ret;
|
||||||
|
}
|
||||||
|
|
||||||
sub owner_desc {
|
sub owner_desc {
|
||||||
my $lines = shift;
|
my $lines = shift;
|
||||||
my @ret;
|
my @ret;
|
||||||
|
|
Loading…
Reference in a new issue