diff options
author | Thorsten Leemhuis <fedora@leemhuis.info> | 2023-02-04 09:24:53 +0100 |
---|---|---|
committer | Thorsten Leemhuis <fedora@leemhuis.info> | 2023-02-04 09:24:53 +0100 |
commit | 710607627563e6f74121d207e4606f543238f303 (patch) | |
tree | 14703249c9eb4512b8bc4dd0e9351cc7547824dc /merge.pl | |
parent | 2310bfb9db6ac8bedbe0ef5d2b218abf57d6d979 (diff) | |
parent | c97f56fe27309b3394cab2fef4b3d454df7071f0 (diff) | |
download | kernel-rawhide-user-thl-vanilla-fedora.tar.gz kernel-rawhide-user-thl-vanilla-fedora.tar.xz kernel-rawhide-user-thl-vanilla-fedora.zip |
Merge remote-tracking branch 'origin/rawhide' into rawhide-user-thl-vanilla-fedorakernel-6.2.0-0.rc6.20230203git66a87fff1a87.47.vanilla.1.fc38kernel-6.2.0-0.rc6.20230203git66a87fff1a87.47.vanilla.1.fc37kernel-6.2.0-0.rc6.20230203git66a87fff1a87.47.vanilla.1.fc36rawhide-user-thl-vanilla-fedora
Diffstat (limited to 'merge.pl')
-rwxr-xr-x | merge.pl | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/merge.pl b/merge.pl deleted file mode 100755 index dbaf5927b..000000000 --- a/merge.pl +++ /dev/null @@ -1,72 +0,0 @@ -#! /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 (/^\#/) { - # fall through on comments like 'avoid CONFIG_FOO=y' - ; - } 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 (/^\#/) { - # fall through on comments like 'avoid CONFIG_FOO=y' - ; - } 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; |