Skip to content

Commit

Permalink
clone_job: Make _GROUP and _GROUP_ID override each other
Browse files Browse the repository at this point in the history
  • Loading branch information
Martchus committed Jul 6, 2018
1 parent 947f8b1 commit 9cea982
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions script/clone_job.pl
Expand Up @@ -281,12 +281,20 @@ sub clone_job {
if (my $group_id = $job->{group_id}) {
$settings{_GROUP_ID} = $group_id;
}
my %overrides = (
_GROUP => '_GROUP_ID',
_GROUP_ID => '_GROUP',
);
print("settings _GROUP: " . $settings{_GROUP} . "\n");
delete $settings{NAME}; # usually autocreated
if ($depth == 0 or $options{'parental-inheritance'}) {
for my $arg (@ARGV) {
if ($arg =~ /([A-Z0-9_]+)=(.*)/) {
if (defined $2) {
$settings{$1} = $2;
if (my $override = $overrides{$1}) {
delete $settings{$override};
}
}
else {
delete $settings{$1};
Expand Down

0 comments on commit 9cea982

Please sign in to comment.