add descriptions to the broadcom target profiles and export them to the target metadata (not presented in menuconfig yet)
[openwrt.org/openwrt.git] / scripts / metadata.pl
blob:a/scripts/metadata.pl -> blob:b/scripts/metadata.pl
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -45,6 +45,14 @@
 		};
 		/^Target-Profile-Name:\s*(.+)\s*$/ and $profile->{name} = $1;
 		/^Target-Profile-Packages:\s*(.*)\s*$/ and $profile->{packages} = [ split(/\s+/, $1) ];
+		/^Target-Profile-Description:/ and do {
+			my $desc;
+			while (<>) {
+				last if /^@@/;
+				$desc .= $_;
+			}
+			$profile->{desc} = $desc;
+		};
 	}
 	foreach my $target (@target) {
 		@{$target->{profiles}} > 0 or $target->{profiles} = [

comments