summaryrefslogtreecommitdiffstats
path: root/scripts/metadata.pl
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-05-10 14:43:46 +0200
committerFelix Fietkau <nbd@nbd.name>2016-05-11 19:03:35 +0200
commit1189af85fd35f46fa5239b5de6113d3665b9d9cf (patch)
treecaec812f4367e314cf84b1eb62e3598ae81d51c0 /scripts/metadata.pl
parent87550a0e8784805ade2058c3f320add972062941 (diff)
downloadmaster-31e0f0ae-1189af85fd35f46fa5239b5de6113d3665b9d9cf.tar.gz
master-31e0f0ae-1189af85fd35f46fa5239b5de6113d3665b9d9cf.tar.bz2
master-31e0f0ae-1189af85fd35f46fa5239b5de6113d3665b9d9cf.zip
metadata.pl: add support for forcing sorting of profiles
Used to mix device profiles (specified in the image makefile) with regular target profiles. Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'scripts/metadata.pl')
-rwxr-xr-xscripts/metadata.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index 410fa9fe24..f5afb1e47b 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -282,6 +282,10 @@ EOF
foreach my $target (@target) {
my $profiles = $target->{profiles};
+ $target->{sort} and @$profiles = sort {
+ $a->{priority} <=> $b->{priority} or
+ $a->{name} cmp $b->{name};
+ } @$profiles;
foreach my $profile (@$profiles) {
print <<EOF;