rename stuff to write out 'config' instead of 'config.common'. This is my
first ever attempt to python hackery. fear. svn path=/trunk/kernel/source/linux-2.6-2.6.12/; revision=3520
This commit is contained in:
parent
e70192de4e
commit
593e429b6e
|
@ -1,11 +1,11 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
#
|
#
|
||||||
# Scans underlying directory structure for files with names config.ext
|
# Scans underlying directory structure for files with names config.*
|
||||||
# where .ext is not .stub, .common or .default, and extracts a common
|
# where .* is not .stub or .default, and extracts a common
|
||||||
# set of config options from them. The resulting set of options is
|
# set of config options from them. The resulting set of options is
|
||||||
# written into the config.common file. On the second pass each config.ext
|
# written into the 'config' file. On the second pass each config.*
|
||||||
# file is parsed to remove the common config options found in
|
# file is parsed to remove the common config options found in
|
||||||
# config.common, with the results written to config.ext.stub.
|
# config, with the results written to config.*.stub.
|
||||||
#
|
#
|
||||||
import os, string, sys
|
import os, string, sys
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ def walk_callback(arg, dir, names):
|
||||||
if names.count('.svn'): names.remove('.svn')
|
if names.count('.svn'): names.remove('.svn')
|
||||||
for name in names:
|
for name in names:
|
||||||
base, ext = os.path.splitext(name)
|
base, ext = os.path.splitext(name)
|
||||||
if(base == 'config' and ext not in ('.default', '.stub', '.common')):
|
if(base == 'config' and ext not in ('.default', '.stub', '')):
|
||||||
fname = os.path.join(dir,name)
|
fname = os.path.join(dir,name)
|
||||||
conffiles.append(fname)
|
conffiles.append(fname)
|
||||||
print 'Processing ' + fname + ' ... ',
|
print 'Processing ' + fname + ' ... ',
|
||||||
|
@ -55,8 +55,8 @@ def walk_callback(arg, dir, names):
|
||||||
# Main routine
|
# Main routine
|
||||||
#
|
#
|
||||||
os.path.walk('.', walk_callback, None)
|
os.path.walk('.', walk_callback, None)
|
||||||
print 'Writing the config.common output file ... ',
|
print 'Writing the config output file ... ',
|
||||||
write_out(common, 'config.common')
|
write_out(common, 'config')
|
||||||
print 'done.'
|
print 'done.'
|
||||||
for fname in conffiles:
|
for fname in conffiles:
|
||||||
print 'Writing the ' + fname + '.stub output file ... ',
|
print 'Writing the ' + fname + '.stub output file ... ',
|
||||||
|
|
Loading…
Reference in New Issue