summaryrefslogtreecommitdiff
path: root/tools/moveconfig.py
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-05-19 15:52:09 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2016-06-13 07:46:28 +0900
commit6a9f79f712dfce7c451c26120ffc112d3e1a88e7 (patch)
tree1f2dce144c461ff7be27ef7bb761ee91146b02c4 /tools/moveconfig.py
parent8513dc048598bba15f75ab3fbe257159cb27007a (diff)
downloadu-boot-6a9f79f712dfce7c451c26120ffc112d3e1a88e7.tar.gz
tools: moveconfig: allow to run without any CONFIG specified
I found "tools/moveconfig -s" might be useful for defconfig re-sync. I could optimize it for re-sync if I wanted, but I do not want to make the code complex for this feature. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'tools/moveconfig.py')
-rwxr-xr-xtools/moveconfig.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index 95a73569a1..eee28b37a6 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -839,10 +839,13 @@ def move_config(configs, options):
options: option flags
"""
if len(configs) == 0:
- print 'Nothing to do. exit.'
- sys.exit(0)
-
- print 'Move %s (jobs: %d)' % (', '.join(configs), options.jobs)
+ if options.force_sync:
+ print 'No CONFIG is specified. You are probably syncing defconfigs.',
+ else:
+ print 'Neither CONFIG nor --force-sync is specified. Nothing will happen.',
+ else:
+ print 'Move ' + ', '.join(configs),
+ print '(jobs: %d)\n' % options.jobs
if options.defconfigs:
defconfigs = [line.strip() for line in open(options.defconfigs)]
@@ -909,7 +912,7 @@ def main():
(options, configs) = parser.parse_args()
- if len(configs) == 0:
+ if len(configs) == 0 and not options.force_sync:
parser.print_usage()
sys.exit(1)
@@ -926,7 +929,8 @@ def main():
if not options.cleanup_headers_only:
move_config(configs, options)
- cleanup_headers(configs, options.dry_run)
+ if configs:
+ cleanup_headers(configs, options.dry_run)
if __name__ == '__main__':
main()