Skip to content

Commit

Permalink
scripts: add partial update functionality to configuration upgrade sc…
Browse files Browse the repository at this point in the history
…ript

This matches the way this has been handled in the past.  This could
also help devices which were skipped due to abandoned plans to drop.

Signed-off-by: Elliott Mitchell <ehem+openwrt@m5p.com>
  • Loading branch information
ehem committed Mar 19, 2024
1 parent e0effe8 commit 498ed9c
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions scripts/kernel_upgrade.pl
Expand Up @@ -209,8 +209,8 @@ ()
} # end of interface to git fast-import


die(<<"__USAGE__") if(@ARGV!=2);
Usage: $0 <old-version> <new-version>
die(<<"__USAGE__") if(@ARGV<2);
Usage: $0 <old-version> <new-version> [<board(s)...>]
Copies all kernel configuration files and patches from the old version
to the new version. Git history is preserved on the copies by using a
Expand All @@ -225,6 +225,12 @@ ()
Note, the two strings are non-optional, but completely free-form.
There are no limitations besides whether they can be used in a
file-name (\\0 is the only invalid character).
One or more boards can be specified to update a subset of boards. This
can include "generic", this can also include a subdirectory for a device.
The end merge commit /can/ be amended to remove files which should not
be included during an update.
__USAGE__

my $from=shift(@ARGV);
Expand All @@ -235,9 +241,19 @@ ()

my $start=gethead();

my $list=getlistmatch('HEAD', $target, $from);
my $list;
unless(@ARGV) {
$list=getlistmatch('HEAD', $target, $from);

die("no files matching \"$from\" found") unless(@$list);
} else {
foreach my $board (@ARGV) {
$board=getlistmatch('HEAD', $target.$board, $from);

die("no files matching \"$from\" found") unless(@$list);
die("no files matching \"$from\" found in $target$board") unless(@$board);
push(@$list, @$board);
}
}


my $git=GitImporter->new();
Expand Down

0 comments on commit 498ed9c

Please sign in to comment.