diff options
author | Don Zickus <dzickus@redhat.com> | 2017-11-06 16:55:26 -0500 |
---|---|---|
committer | Laura Abbott <labbott@redhat.com> | 2017-11-13 09:39:16 -0800 |
commit | 4be26cbac7c0b76d6d77783cfb114206b1a7716b (patch) | |
tree | 3a3091fa3dad8cd0c77b543b2b675d4ea87f22cf /merge.pl | |
parent | c54d82caa97d0d11e06f263f92394479bf3bb437 (diff) | |
download | kernel-4be26cbac7c0b76d6d77783cfb114206b1a7716b.tar.gz kernel-4be26cbac7c0b76d6d77783cfb114206b1a7716b.tar.xz kernel-4be26cbac7c0b76d6d77783cfb114206b1a7716b.zip |
configs: Create symlinks to used scripts
As part of the config re-organization, put the scripts needed to create
the config files in the configs/ directory. At the top level create
symlinks for those scripts. This allows the kernel.spec file to find
the scripts it needs and work correctly.
No code changes.
Diffstat (limited to 'merge.pl')
l---------[-rwxr-xr-x] | merge.pl | 67 |
1 files changed, 1 insertions, 66 deletions
diff --git a/merge.pl b/merge.pl index 8c318156a..b77225dd2 100755..120000 --- a/merge.pl +++ b/merge.pl @@ -1,66 +1 @@ -#! /usr/bin/perl - -my @args=@ARGV; -my %configvalues; -my @configoptions; -my $configcounter = 0; - -# optionally print out the architecture as the first line of our output -my $arch = $args[2]; -if (defined $arch) { - print "# $arch\n"; -} - -# first, read the override file - -open (FILE,"$args[0]") || die "Could not open $args[0]"; -while (<FILE>) { - my $str = $_; - my $configname; - - if (/\# ([\w]+) is not set/) { - $configname = $1; - } elsif (/([\w]+)=/) { - $configname = $1; - } - - if (defined($configname) && !exists($configvalues{$configname})) { - $configvalues{$configname} = $str; - $configoptions[$configcounter] = $configname; - $configcounter ++; - } -}; - -# now, read and output the entire configfile, except for the overridden -# parts... for those the new value is printed. - -open (FILE2,"$args[1]") || die "Could not open $args[1]"; -while (<FILE2>) { - my $configname; - - if (/\# ([\w]+) is not set/) { - $configname = $1; - } elsif (/([\w]+)=/) { - $configname = $1; - } - - if (defined($configname) && exists($configvalues{$configname})) { - print "$configvalues{$configname}"; - delete($configvalues{$configname}); - } else { - print "$_"; - } -} - -# now print the new values from the overridden configfile -my $counter = 0; - -while ($counter < $configcounter) { - my $configname = $configoptions[$counter]; - if (exists($configvalues{$configname})) { - print "$configvalues{$configname}"; - } - $counter++; -} - -1; +configs/merge.pl
\ No newline at end of file |