diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2023-03-17 12:58:37 +0100 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2023-03-17 12:58:37 +0100 |
commit | f660f44c5b91a44a2208ba4c81b9e2d0fb8746d5 (patch) | |
tree | ab4ecfa2a61bcf66d96695b104c3c5bb305a70b9 /SOURCES/merge.pl | |
parent | 4241164144fbb3257cb93c3e6cf2a96294789a8a (diff) | |
download | kernel-fsync-f660f44c5b91a44a2208ba4c81b9e2d0fb8746d5.tar.gz kernel-fsync-f660f44c5b91a44a2208ba4c81b9e2d0fb8746d5.zip |
kernel 6.2.6
Diffstat (limited to 'SOURCES/merge.pl')
-rwxr-xr-x | SOURCES/merge.pl | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/SOURCES/merge.pl b/SOURCES/merge.pl deleted file mode 100755 index dbaf592..0000000 --- a/SOURCES/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; |