busybox: adjust convert_menuconfig.pl to emit relative path references for Config...
[openwrt.git] / package / utils / busybox / convert_menuconfig.pl
index 7342fbd..7051880 100755 (executable)
@@ -41,7 +41,7 @@ while (<FIND>) {
                        undef $cur;
                        undef $default_set;
                }
-               $line =~ s/^(\s*source\s+)/$1package\/utils\/busybox\/config\//;
+               $line =~ s/^(\s*source\s+)([^\/]+\/)*([^\/]+\/[^\/]+)$/$1$3/;
                if ($line =~ /^(\s*range\s*)(\w+)(\s+)(\w+)\s*$/) {
                        my $prefix = $1;
                        my $r1 = $2;