transfer "-d" and "-v" opts to embedded shell scripts
authorJF Ding <jian-feng.ding@intel.com>
Mon, 5 Dec 2011 09:30:28 +0000 (17:30 +0800)
committerJF Ding <jian-feng.ding@intel.com>
Mon, 5 Dec 2011 09:30:28 +0000 (17:30 +0800)
tools/tizenpkg

index c274da4..aa78bc5 100755 (executable)
@@ -32,7 +32,12 @@ def _fall_to_shell(cmdname):
         def _run_embed_sh(self, argv):
             # this command is a shell script wrapper
             shpath = os.path.join(utils.get_share_dir(), cmdname + '.sh')
-            runner.embed(['bash', shpath] + list(argv)[1:])
+            cmdlist = ['bash', shpath]
+            if msger.get_loglevel() == 'debug':
+                cmdlist.append('-d')
+            elif msger.get_loglevel() == 'verbose':
+                cmdlist.append('-v')
+            runner.embed(cmdlist + list(argv)[1:])
         return _run_embed_sh
 
     cmdmod = 'tizenpkg.cmd_' + cmdname