gen_busybox_config.pl 497 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/perl
  2. #
  3. # Copyright (C) 2006 OpenWrt.org
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. use strict;
  9. my $line;
  10. my $l1 = '';
  11. my $l2 = '=y';
  12. while (<>) {
  13. chomp;
  14. /^(# )CONFIG_LARGEFILE(.+)$/ and do {
  15. $l1 = $1;
  16. $l2 = $2;
  17. };
  18. /^(# )?CONFIG_BUSYBOX_(.+)/ and do {
  19. my $p1 = $1;
  20. my $p2 = $2;
  21. $p2 =~ /(CONFIG_LFS|FDISK_SUPPORT_LARGE_DISKS)/ and do {
  22. $p1 = $l1;
  23. $p2 = "$1$l2";
  24. };
  25. print "$p1$p2\n";
  26. }
  27. }