diff mbox

[21/21] tools: moveconfig: allow to run without any CONFIG specified

Message ID 1463640729-25666-22-git-send-email-yamada.masahiro@socionext.com
State New
Headers show

Commit Message

Masahiro Yamada May 19, 2016, 6:52 a.m. UTC
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>

---

 tools/moveconfig.py | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

-- 
1.9.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
diff mbox

Patch

diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index acc3dbb..a9f7c50 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -871,10 +871,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 'Neigher 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)]
@@ -944,7 +947,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)