]>
Commit | Line | Data |
---|---|---|
1f2f120f TG |
1 | #!/bin/bash |
2 | ||
3 | # | |
4 | # Find config variables that might be able to transition from =y to =m | |
5 | # | |
6 | # Example: debian/scripts/misc/tristate.sh debian.master/config/config.common.ubuntu | |
7 | # | |
8 | ||
9 | KC=Kconfig.tmp | |
10 | rm -f ${KC} | |
11 | find .|grep Kconfig | while read f | |
12 | do | |
13 | cat $f >> ${KC} | |
14 | done | |
15 | ||
16 | grep =y $1 | sed -e 's/CONFIG_//' -e 's/=y//' | while read c | |
17 | do | |
18 | cat <<EOF > tristate.awk | |
19 | BEGIN { tristate=0; } | |
20 | /^config ${c}\$/ { tristate=1; next; } | |
21 | /tristate/ { if (tristate == 1) printf("CONFIG_%s=m\n","${c}"); next; } | |
22 | { if (tristate == 1) exit; } | |
23 | EOF | |
24 | ||
25 | gawk -f tristate.awk ${KC} | |
26 | done |