add -h/--help
authorMike Frysinger <vapier@gentoo.org>
Tue, 17 Jan 2006 04:15:49 +0000 (04:15 -0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 17 Jan 2006 04:15:49 +0000 (04:15 -0000)
svn path=/main/trunk/; revision=2565

bin/env-update

index ec5ddf01e65ab40f24114d14190445be731e31af..3db5787d6ff70d39a0caa0160b55a5b6a533d4c4 100755 (executable)
@@ -7,5 +7,20 @@ import os,sys
 os.environ["PORTAGE_CALLER"] = "env-update"
 sys.path = ["/usr/lib/portage/pym"]+sys.path
 
+def usage(status):
+       print "Usage: env-update"
+       print ""
+       print "See the env-update(1) man page for more info"
+       sys.exit(status)
+
+if "-h" in sys.argv or "--help" in sys.argv:
+       usage(0)
+
+makelinks=1
+
+if len(sys.argv) > 1:
+       print "!!! Invalid command line options!\n"
+       usage(1)
+
 import portage
-portage.env_update()
+portage.env_update(makelinks)