aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/busybox/convert_defaults.pl
diff options
context:
space:
mode:
Diffstat (limited to 'package/utils/busybox/convert_defaults.pl')
-rwxr-xr-xpackage/utils/busybox/convert_defaults.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/package/utils/busybox/convert_defaults.pl b/package/utils/busybox/convert_defaults.pl
new file mode 100755
index 0000000000..dada6ef031
--- /dev/null
+++ b/package/utils/busybox/convert_defaults.pl
@@ -0,0 +1,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";
+ };
+}