]> git.madduck.net Git - code/mailplate.git/blobdiff - mailplate

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

set verbose on first invocation
[code/mailplate.git] / mailplate
index 439fc73449415edbd2d23fc8139308221d66bf6b..4b03c05595b6b0cc978997e66a028ebe10b70cc1 100755 (executable)
--- a/mailplate
+++ b/mailplate
@@ -235,6 +235,7 @@ helpers = { 'get_quote' : 'fortune -s' }
 
 if not os.path.exists(CONFFILE):
     # conffile does not exist, let's create it with defaults.
+    options.verbose = True
 
     if not os.path.isdir(MAILPLATEDIR):
         info('configuration directory not found, creating: ' + MAILPLATEDIR)
@@ -325,8 +326,11 @@ elif (options.auto or options.menu) and templname:
     sys.exit(posix.EX_USAGE)
 
 elif not templname and not (options.auto or options.menu):
-    err('no template specified')
-    sys.exit(posix.EX_USAGE)
+    if default_templname is not None:
+        templname = default_templname
+    else:
+        err('no template specified')
+        sys.exit(posix.EX_USAGE)
 
 elif options.menu:
     err('--menu mode not yet implemented')