diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2017-11-09 11:43:13 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2017-11-09 11:43:13 +0100 |
| commit | 395c2db0e9761def8eb992e3e8068ba2d3ab179c (patch) | |
| tree | 7b14ac791dbf9d4b9354f1c6149444e090068309 /examples/defconfig.py | |
| parent | 8c978ee0b9c0f7f8406f58d24478a73330512056 (diff) | |
| parent | 4bffd653148d6fa1c8e626872ae4f445e2b0a24c (diff) | |
Make Kconfiglib 2 official
Merge in the 'kconfiglib-2-backup' branch.
Diffstat (limited to 'examples/defconfig.py')
| -rw-r--r-- | examples/defconfig.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/examples/defconfig.py b/examples/defconfig.py index 3e958e2..236db8d 100644 --- a/examples/defconfig.py +++ b/examples/defconfig.py @@ -1,17 +1,22 @@ # Works like entering "make menuconfig" and immediately saving and exiting +# +# Usage: +# +# $ make [ARCH=<arch>] scriptconfig SCRIPT=Kconfiglib/examples/allyesconfig.py import kconfiglib import os import sys -conf = kconfiglib.Config(sys.argv[1]) +conf = kconfiglib.Kconfig(sys.argv[1]) if os.path.exists(".config"): + print("using existing .config") conf.load_config(".config") else: - defconfig = conf.get_defconfig_filename() - if defconfig is not None: - print("Using" + defconfig) - conf.load_config(defconfig) + if conf.defconfig_filename is not None: + print("using " + conf.defconfig_filename) + conf.load_config(conf.defconfig_filename) conf.write_config(".config") +print("configuration written to .config") |
