(defvar opt-zones nil
"Which zones to be emitted.")
+(defvar opt-format :bind
+ "Which format to use on output.")
(eval-when (:compile-toplevel :load-toplevel)
(defopthandler dir (var arg) ()
(#\d "directory" (:arg "DIRECTORY")
(dir *zone-output-path*)
"Write zone and serial files to DIRECTORY.")
+ (#\F "format" (:arg "FORMAT")
+ (keyword opt-format
+ (delete-duplicates
+ (loop for method in
+ (pcl:generic-function-methods
+ #'zone:zone-write)
+ for specs =
+ (pcl:method-specializers method)
+ if (typep (car specs)
+ 'pcl:eql-specializer)
+ collect
+ (pcl:eql-specializer-object
+ (car specs)))))
+ "Format to use for output.")
(#\z "zone" (:arg "NAME") (list opt-zones)
"Write information about zone NAME.")))
:use '(#:common-lisp #:net #:zone))))
(load f :verbose nil :print nil :if-does-not-exist :error)
(delete-package *package*)))
- (zone-save opt-zones))))
+ (zone-save opt-zones :format opt-format))))
;;;----- That's all, folks --------------------------------------------------