summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 58d2abc)
raw | patch | inline | side by side (parent: 58d2abc)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 30 Jul 2001 01:28:46 +0000 (01:28 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 30 Jul 2001 01:28:46 +0000 (01:28 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@153 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup-admin | patch | blob | history |
diff --git a/roundup-admin b/roundup-admin
index 2d76eacf9c690418c477ae0781ba142ca9b75b9d..dffddbed4e5515b5cba3da3020024deb75749643 100755 (executable)
--- a/roundup-admin
+++ b/roundup-admin
#! /usr/bin/python
-# $Id: roundup-admin,v 1.6 2001-07-30 00:57:51 richard Exp $
+# $Id: roundup-admin,v 1.7 2001-07-30 01:28:46 richard Exp $
import sys
if int(sys.version[0]) < 2:
through INSTANCE_HOME or the -i option. The template, backend and admin
password may be specified on the command-line as arguments, in that order.
'''
- if len(argv) > n:
- template = argv[n]
- backend = argv[n+1]
- else:
- template = backend = ''
-
# select template
import roundup.templates
templates = roundup.templates.listTemplates()
- print 'Templates:', ', '.join(templates)
- template = len(args) and args[0] or ''
+ template = len(args) > 1 and args[1] or ''
+ if template not in templates:
+ print 'Templates:', ', '.join(templates)
while template not in templates:
template = raw_input('Select template [classic]: ').strip()
if not template:
import roundup.backends
backends = roundup.backends.__all__
- backend = len(args) > 1 and args[1] or ''
+ backend = len(args) > 2 and args[2] or ''
+ if backend not in backends:
+ print 'Back ends:', ', '.join(backends)
while backend not in backends:
backend = raw_input('Select backend [anydbm]: ').strip()
if not backend:
backend = 'anydbm'
- if len(args) > 2:
- adminpw = confirm = args[2]
+ if len(args) > 3:
+ adminpw = confirm = args[3]
else:
adminpw = ''
confirm = 'x'
#
# $Log: not supported by cvs2svn $
+# Revision 1.6 2001/07/30 00:57:51 richard
+# Now uses getopt, much improved command-line parsing. Much fuller help. Much
+# better internal structure. It's just BETTER. :)
+#
# Revision 1.5 2001/07/30 00:04:48 richard
# Made the "init" prompting more friendly.
#