summaryrefslogtreecommitdiff
path: root/package/utils/busybox/convert_defaults.pl
blob: dada6ef031349b73b55844eefda1a21219b2c371 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env perl

while (<>) {
	/^(# )?CONFIG_([^=]+)(=(.+)| is not set)/ and do {
		my $default = $4;
		$1 and $default = "n";
		my $name = $2;
		my $type = "bool";
		$default =~ /^\"/ and $type = "string";
		$default =~ /^\d/ and $type = "int";
		print "config BUSYBOX_DEFAULT_$name\n\t$type\n\tdefault $default\n";
	};
}