aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/busybox/convert_defaults.pl
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-01-31 13:50:16 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-01-31 13:50:16 +0000
commitcc7b3e2465f57c92879e39690021b3276d4c61aa (patch)
tree441b554f3f955f9051e08a14220d799fd635d303 /package/utils/busybox/convert_defaults.pl
parentc85705ce8dee363f2ff5c4b0e8f82416a8c4416f (diff)
downloadupstream-cc7b3e2465f57c92879e39690021b3276d4c61aa.tar.gz
upstream-cc7b3e2465f57c92879e39690021b3276d4c61aa.tar.bz2
upstream-cc7b3e2465f57c92879e39690021b3276d4c61aa.zip
busybox: add a reworked implementation of menuconfig support, this time with a guard option that keeps all symbols at default values until an extra option is activated
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39435
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";
+ };
+}