diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2017-10-09 23:05:00 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2017-10-24 19:24:08 +0200 |
| commit | dd0e227216e247d2040cdd40bf7397702880cdc4 (patch) | |
| tree | 4c76ebb2e7555d28214cddecf32ffb424fa1732b /examples/defconfig.py | |
| parent | f64aaf971176305233f16a11911a660fa6f99561 (diff) | |
Kconfiglib 2 backup
WIP
Diffstat (limited to 'examples/defconfig.py')
| -rw-r--r-- | examples/defconfig.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/examples/defconfig.py b/examples/defconfig.py index 3e958e2..ce2bf6e 100644 --- a/examples/defconfig.py +++ b/examples/defconfig.py @@ -1,4 +1,8 @@ # Works like entering "make menuconfig" and immediately saving and exiting +# +# Usage: +# +# $ make [ARCH=<arch>] scriptconfig SCRIPT=Kconfiglib/examples/allyesconfig.py import kconfiglib import os @@ -7,11 +11,12 @@ import sys conf = kconfiglib.Config(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") |
