blob: 3e958e24efd6316599dc0b18e4ac8553d25d7d3a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# Works like entering "make menuconfig" and immediately saving and exiting
import kconfiglib
import os
import sys
conf = kconfiglib.Config(sys.argv[1])
if os.path.exists(".config"):
conf.load_config(".config")
else:
defconfig = conf.get_defconfig_filename()
if defconfig is not None:
print("Using" + defconfig)
conf.load_config(defconfig)
conf.write_config(".config")
|