credit where credit is due
[openwrt.git] / scripts / configtest.pl
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
9 my %change = (
10 '^BUSYBOX' => 'make package/busybox-clean',
11 'OPENVPN_' => 'make package/openvpn-clean',
12 'SYSCONF_' => 'make package/base-files-clean target_clean',
13 '' => 'make target_clean'
14 );
15
16 my @configfiles = (
17 # ['package/linux/linux.config', 'build_mipsel/linux/.config' =>
18 # 'make -C package linux-clean']
19 );
20
21
22
23 foreach my $change (keys %change) {
24 my $v1 = `grep '$change' .config.test`;
25 my $v2 = `grep '$change' .config`;
26 $v1 eq $v2 or system($change{$change});
27 }
28
29 foreach my $file (@configfiles) {
30 if ((-f $file->[0]) and (-f $file->[1])) {
31 my @s1 = stat $file->[0];
32 my @s2 = stat $file->[1];
33 $s1[9] > $s2[9] and system($file->[2]);
34 }
35 }
This page took 0.049317 seconds and 5 git commands to generate.