diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-01-31 13:50:16 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-01-31 13:50:16 +0000 |
commit | deae5957c915ed94fba8a8af4ad236a3749125b5 (patch) | |
tree | 6d18c12343a5c4cf68c6895276ff69ffd7245124 /package/utils/busybox/convert_defaults.pl | |
parent | 004cf6a87c872706047a2db83e44994d91d3aca1 (diff) | |
download | master-187ad058-deae5957c915ed94fba8a8af4ad236a3749125b5.tar.gz master-187ad058-deae5957c915ed94fba8a8af4ad236a3749125b5.tar.bz2 master-187ad058-deae5957c915ed94fba8a8af4ad236a3749125b5.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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39435 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/utils/busybox/convert_defaults.pl')
-rwxr-xr-x | package/utils/busybox/convert_defaults.pl | 13 |
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"; + }; +} |