mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-05 10:56:10 +02:00
Add a --upgrade-config option to the main command line.
This commit is contained in:
parent
8caf408c59
commit
a97a228ec9
12
main.lisp
12
main.lisp
@ -21,6 +21,9 @@
|
||||
(("verbose" #\v) :type boolean :documentation "Be verbose")
|
||||
(("debug" #\d) :type boolean :documentation "Diplay debug level information.")
|
||||
|
||||
(("upgrade-config" #\U) :type boolean
|
||||
:documentation "Output the command(s) corresponding to .conf file for v2.x")
|
||||
|
||||
(("list-encodings" #\E) :type boolean
|
||||
:documentation "List pgloader known encodings and exit.")
|
||||
|
||||
@ -34,7 +37,7 @@
|
||||
(command-line-arguments:process-command-line-options *opt-spec* args)
|
||||
|
||||
(destructuring-bind (&key help version quiet verbose debug
|
||||
list-encodings load)
|
||||
list-encodings upgrade-config load)
|
||||
options
|
||||
|
||||
(when version
|
||||
@ -49,6 +52,13 @@
|
||||
(list-encodings)
|
||||
(uiop:quit))
|
||||
|
||||
(when upgrade-config
|
||||
(loop for filename in arguments
|
||||
do
|
||||
(pgloader.ini:convert-ini-into-commands filename)
|
||||
(format t "~%~%"))
|
||||
(uiop:quit))
|
||||
|
||||
(setf *client-min-messages* (cond (debug :debug)
|
||||
(verbose :info)
|
||||
(quiet :warning)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user