From dc5596238919f98dcf9bfd221908250595be4cf7 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Wed, 9 Oct 2013 10:44:38 +0200 Subject: [PATCH] Fix the #! script to have the same behaviour as the main binary executable. --- pgloader.lisp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/pgloader.lisp b/pgloader.lisp index 4eae19f2..c9092362 100755 --- a/pgloader.lisp +++ b/pgloader.lisp @@ -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*)