diff options
Diffstat (limited to 'config/busybox/Extract')
-rwxr-xr-x | config/busybox/Extract | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/config/busybox/Extract b/config/busybox/Extract new file mode 100755 index 000000000..475b28e1f --- /dev/null +++ b/config/busybox/Extract @@ -0,0 +1,42 @@ +#!/usr/bin/perl + +# +# first extract all configuration files from the original source tree +# + +@configfiles = `find ../../build/busybox* -name "Config.in"`; + +while($_ = shift @configfiles) { + chomp $_; + my $filename = $_; $filename =~ s/(.*\/busybox.*?)\/(.*$)/$2/; + my $dir = $filename; $dir =~ s/(.*\/)(.*$)/$1/; + system("mkdir -p $dir"); + system("../../scripts/mkprefix -v -p BB_ < $_ > $filename"); +} + + +# +# fix some entries +# + +print "---------------------------------------------------------------------\n"; +print "Fixing some stuff...\n"; +print "---------------------------------------------------------------------\n"; + +@fixfiles = `find . -name "Config.in"`; + +while($file = shift @fixfiles) { + + open (FILE, "$file"); + @file = <FILE>; + close FILE; + + for (@file) { $_ =~ s/^source (.*)/source config\/busybox\/$1/g; } + for (@file) { $_ =~ s/^mainmenu (.*$)/# mainmenu $1/g; } + for (@file) { $_ =~ s/^(menu .*)$/$1\n depends on BUSYBOX/g; } + + open (FILE, ">$file"); + print FILE @file; + close FILE; + +} |