Fix the #! script to have the same behaviour as the main binary executable.

This commit is contained in:
Dimitri Fontaine 2013-10-09 10:44:38 +02:00
parent 62c402b0e5
commit dc55962389

View File

@ -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*)