Skip to content

Commit

Permalink
Add --version option.
Browse files Browse the repository at this point in the history
  • Loading branch information
fukamachi committed Sep 26, 2018
1 parent 9bd6b26 commit 70f7527
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions roswell/qlot.ros
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,17 @@ COMMANDS:
exec [shell-args..]
Invokes the following shell-command with the project local Quicklisp.
OPTIONS:
--version
Show the Qlot version
"
(file-namestring *load-pathname*)))

(defun print-version ()
(format t "~&Qlot ~A~%"
(asdf:component-version (asdf:find-system :qlot))))

(defun use-local-quicklisp ()
;; Set QUICKLISP_HOME ./quicklisp/
(unless (ros:getenv "QUICKLISP_HOME")
Expand Down Expand Up @@ -107,6 +115,9 @@ COMMANDS:
(remove ""
(split #\, project)
:test 'equal)))))
("--version"
(print-version)
(ros:quit))
(otherwise
(unless (and (null parsing-options)
(null target))
Expand Down Expand Up @@ -160,6 +171,9 @@ COMMANDS:
(unless command
(print-error "Command not found: ~A" (first argv)))
(ros:exec (cons command (rest argv)))))
((equal "--version" $1)
(print-version)
(ros:quit))
(t (print-usage)
(ros:quit 1)))
#+sbcl (sb-sys:interactive-interrupt () (uiop:quit -1 nil))))

0 comments on commit 70f7527

Please sign in to comment.