mirror of
https://github.com/dimitri/pgloader.git
synced 2026-01-30 11:31:01 +01:00
Fix the #! script to have the same behaviour as the main binary executable.
This commit is contained in:
parent
62c402b0e5
commit
dc55962389
@ -19,25 +19,5 @@
|
||||
|
||||
(in-package #:pgloader)
|
||||
|
||||
(defparameter *opt-spec*
|
||||
`((("help" #\h) :type boolean :documentation "show usage")
|
||||
(("file" #\f) :type string :documentation "read commands from file")))
|
||||
|
||||
(defun main (argv)
|
||||
"Entry point when building an executable image with buildapp"
|
||||
(multiple-value-bind (options arguments)
|
||||
(command-line-arguments:process-command-line-options *opt-spec* argv)
|
||||
(declare (ignore arguments))
|
||||
(destructuring-bind (&key help file) options
|
||||
|
||||
(when help
|
||||
(command-line-arguments:show-option-help *opt-spec*)
|
||||
(uiop:quit))
|
||||
|
||||
(run-command (slurp-file-into-string file))
|
||||
(format t "~&")
|
||||
|
||||
(uiop:quit))))
|
||||
|
||||
;;; actually call the main function, too
|
||||
(main (uiop:command-line-arguments))
|
||||
(main SB-EXT:*POSIX-ARGV*)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user