convert_defaults.pl 327 B

12345678910111213
  1. #!/usr/bin/env perl
  2. while (<>) {
  3. /^(# )?CONFIG_([^=]+)(=(.+)| is not set)/ and do {
  4. my $default = $4;
  5. $1 and $default = "n";
  6. my $name = $2;
  7. my $type = "bool";
  8. $default =~ /^\"/ and $type = "string";
  9. $default =~ /^\d/ and $type = "int";
  10. print "config BUSYBOX_DEFAULT_$name\n\t$type\n\tdefault $default\n";
  11. };
  12. }