]> git.decadent.org.uk Git - dak.git/blobdiff - julia
options cleanup
[dak.git] / julia
diff --git a/julia b/julia
index 0a4d2fdd9bb83432e99f7d3d472770d5ff4e234b..6d5ff3746c20caeff54399ee052644187ab4f028 100755 (executable)
--- a/julia
+++ b/julia
@@ -2,7 +2,7 @@
 
 # Sync PostgreSQL with (LDAP-generated) passwd file
 # Copyright (C) 2001  James Troup <james@nocrew.org>
-# $Id: julia,v 1.1 2001-09-13 23:55:51 troup Exp $
+# $Id: julia,v 1.2 2001-09-27 01:23:41 troup Exp $
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,6 +18,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
+################################################################################
+
 # <aj> ARRRGGGHHH
 # <aj> what's wrong with me!?!?!?
 # <aj> i was just nice to some mormon doorknockers!!!
@@ -38,12 +40,13 @@ Cnf = None;
 projectB = None;
 ################################################################################
 
-def usage (exit_code):
+def usage (exit_code=0):
     print """Usage: julia [OPTION]... PASSWD_FILE
-Sync postgres' pg_shadow with PASSWD_FILE.
+Sync PostgreSQL's pg_user with PASSWD_FILE.
 
-  -v, --verbose explain what is being done
-  -h, --help    display this help and exit"""
+  -q, --quiet                be quiet about what is being done
+  -v, --verbose              explain what is being done
+  -h, --help                 show this help and exit"""
     sys.exit(exit_code)
 
 ################################################################################
@@ -58,15 +61,15 @@ def main ():
 
     Arguments = [('q',"quiet","Julia::Options::Quiet"),
                  ('v',"verbose","Julia::Options::Verbose"),
-                 ('D',"debug","Julia::Options::Debug", "IntVal"),
-                 ('h',"help","Julia::Options::Help"),
-                 ('V',"version","Julia::Options::Version")];
+                 ('h',"help","Julia::Options::Help")];
+    for i in ["quiet", "verbose", "help" ]:
+        Cnf["Julia::Options::%s" % (i)] = "";
 
     arguments = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv);
     Options = Cnf.SubTree("Julia::Options")
 
     if Options["Help"]:
-        usage(0);
+        usage();
     if arguments == []:
         utils.warn("julia needs the name of the passwd file to sync with as an argument.");
         usage(1);