chiark
/
gitweb
/
~mdw
/
zone
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
frontend: Allow use of new zone machinery.
[zone]
/
frontend.lisp
diff --git
a/frontend.lisp
b/frontend.lisp
index 5241be0f70df0054a13ecabd4a04ce580d5b225c..ef9c090536e8deeba55d4a1da9b5df870fcd5088 100644
(file)
--- a/
frontend.lisp
+++ b/
frontend.lisp
@@
-31,11
+31,29
@@
(in-package #:zone.frontend)
(defvar opt-zones nil
"Which zones to be emitted.")
(defvar opt-zones nil
"Which zones to be emitted.")
+(eval-when (:compile-toplevel :load-toplevel)
+ (defopthandler dir (var arg) ()
+ (let ((path (probe-file arg)))
+ (if (and path
+ (not (pathname-name path)))
+ (setf var path)
+ (option-parse-error "path `~A' doesn't name a directory." arg)))))
+
(define-program
:version "1.0.0" :usage "ZONEDEF..."
:help "Generates BIND zone files from Lisp descriptions."
:options (options help-options
(define-program
:version "1.0.0" :usage "ZONEDEF..."
:help "Generates BIND zone files from Lisp descriptions."
:options (options help-options
+ "Parsing options"
+ (#\f "feature" (:arg "KEYWORD")
+ (list *features* 'keyword)
+ "Insert KEYWORD in *features* list.")
+ (#\s "subnet" (:arg "NET")
+ (list zone:*preferred-subnets*)
+ "Designate NET as a preferred subnet.")
"Output options"
"Output options"
+ (#\d "directory" (:arg "DIRECTORY")
+ (dir *zone-output-path*)
+ "Write zone and serial files to DIRECTORY.")
(#\z "zone" (:arg "NAME") (list opt-zones)
"Write information about zone NAME.")))
(#\z "zone" (:arg "NAME") (list opt-zones)
"Write information about zone NAME.")))