add version output for tools
authorJF Ding <jian-feng.ding@intel.com>
Mon, 15 Aug 2011 10:49:17 +0000 (18:49 +0800)
committerJF Ding <jian-feng.ding@intel.com>
Mon, 15 Aug 2011 10:49:17 +0000 (18:49 +0800)
tools/mic

index 8b54f45..06ea75a 100755 (executable)
--- a/tools/mic
+++ b/tools/mic
@@ -1,8 +1,26 @@
-#!/usr/bin/python -t
-
-import os
-import sys
+#!/usr/bin/python -tt
+#
+# Copyright 2008, 2009, 2010 Intel, Inc.
+#
+# This copyrighted material is made available to anyone wishing to use, modify,
+# copy, or redistribute it subject to the terms and conditions of the GNU
+# General Public License v.2.  This program is distributed in the hope that it
+# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
+# implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 51
+# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  Any Red Hat
+# trademarks that are incorporated in the source code or documentation are not
+# subject to the GNU General Public License and may only be used or replicated
+# with the express permission of Red Hat, Inc.
+#
+
+import os, sys
 import logging
+
+from mic.__version__ import VERSION
 import mic.utils.cmdln as cmdln
 import mic.utils.misc as misc
 import mic.utils.errors as errors
@@ -11,18 +29,17 @@ import mic.pluginmgr as pluginmgr
 import mic.creator as creator
 
 class Mic(cmdln.Cmdln):
-    """Usage: mic SUBCOMMAND [OPTS] [ARGS...]
+    """ Usage: mic SUBCOMMAND [OPTS] [ARGS...]
 
     MeeGo Image Creator Tool.
 
     ${command_list}
     ${help_list}
     global ${option_list}
-    For additional information, see
-    * http://www.meego.com/
     """
+
     name = 'mic'
-    version = None
+    version = VERSION
 
     @cmdln.alias("cr")
     def do_create(self, argv):