-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
106 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
;;;; cmds/core/info.lisp --- Build executable | ||
|
||
;;; Commentary | ||
;; | ||
;; The `info' command definition. | ||
;; | ||
|
||
;;; Code | ||
|
||
(defpackage qob-cli/info | ||
(:use cl) | ||
(:export command)) | ||
|
||
(in-package :qob-cli/info) | ||
|
||
(defun options () | ||
"Options for `info' command." | ||
(list )) | ||
|
||
(defun handler (cmd) | ||
"Handler for `info' command." | ||
(qob-cli:call-script "core/info" cmd)) | ||
|
||
(defun command () | ||
"The `info' command." | ||
(clingon:make-command | ||
:name "info" | ||
:description "Display information about the current system(s)" | ||
:options (options) | ||
:handler #'handler)) | ||
|
||
;;; End of cmds/core/info.lisp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
;;;; lisp/core/info.lisp --- Print systems info | ||
|
||
;;; Commentary | ||
;; | ||
;; Command use to print systems info, | ||
;; | ||
;; $ qob info | ||
;; | ||
|
||
;;; Code | ||
|
||
(qob-init-asds) | ||
|
||
(defun qob-info--print-system (name system) | ||
"Print the SYSTEM info." | ||
(let ((author (asdf:system-author system)) | ||
(maintainer (asdf:system-maintainer system)) | ||
(version (asdf:component-version system)) | ||
(description (asdf:system-description system)) | ||
(homepage (asdf:system-homepage system)) | ||
(license (asdf:system-license system)) | ||
(depends-on (asdf:system-depends-on system))) | ||
(qob-println "~A (~A) | deps: ~A" | ||
(qob-ansi-green name) | ||
(qob-ansi-yellow version) | ||
(qob-ansi-cyan (length depends-on))) | ||
(when description | ||
(qob-println description)) | ||
(when homepage | ||
(qob-println (qob-ansi-cyan homepage))) | ||
(when author | ||
(qob-println "") | ||
(qob-println "Author: ~A" (qob-ansi-white author))) | ||
(when maintainer | ||
(qob-println "Maintainer: ~A" (qob-ansi-white maintainer))) | ||
(when license | ||
(qob-println "License: ~A" (qob-ansi-white license))) | ||
(when depends-on | ||
(qob-println "") | ||
(qob-println "dependencies:") | ||
(dolist (dep depends-on) | ||
;; TODO: Print system version? | ||
(qob-println " ~A" dep))))) | ||
|
||
(let ((names qob-args)) | ||
(cond ((zerop (length names)) | ||
(qob-help "core/info")) | ||
(t | ||
(dolist (name names) | ||
(let ((system (asdf:find-system name))) | ||
(qob-info--print-system name system)))))) | ||
|
||
;;; End of lisp/core/info.lisp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters