]> git.itanic.dy.fi Git - emerge-timer/commitdiff
Add help screen
authorEsko Kokkonen <esko.kokkonen@gmail.com>
Thu, 18 Aug 2011 14:12:42 +0000 (17:12 +0300)
committerEsko Kokkonen <esko.kokkonen@gmail.com>
Thu, 18 Aug 2011 14:12:42 +0000 (17:12 +0300)
The help screen can be accessed with the flags -h or --help

emerge-timer.py

index 1a78bde20c2208776df27d7e6b82a20248ca219b..474af710b95df2a3ee192385a2e53a28aaf07a5f 100755 (executable)
@@ -443,6 +443,13 @@ if __name__ == "__main__":
         main('pretended')
         sys.exit(1)
 
+    elif ((sys.argv[1] == "-h") or (sys.argv[1] == "--help")):
+        print("Usage: emerge-timer.py [options] [package]\n\nOptions:\n"
+              + green_start + "\t-p" + color_stop +
+              "\tcalculate compile time from piped 'emerge -p' output\n" +
+              green_start + "\t[none]" + color_stop +
+              "\tShow average emerge times for currently compiling packages.")
+        sys.exit(1)
 
     if len(sys.argv) > 1:
         package_name = sys.argv[1]