Commit 7a3ef37c authored by Eric Timmons's avatar Eric Timmons
Browse files

Add client cat command

parent e83de676
......@@ -5,6 +5,7 @@
(uiop:define-package #:clpm-cli/commands/client
(:use #:cl
#:clpm-cli/commands/client/cat
#:clpm-cli/commands/client/common
#:clpm-cli/commands/client/rc
#:clpm-cli/commands/client/repl
......
;;;; clpm client cat
;;;;
;;;; This software is part of CLPM. See README.org for more information. See
;;;; LICENSE for license information.
(uiop:define-package #:clpm-cli/commands/client/cat
(:use #:cl
#:clpm-cli/common-args
#:clpm-cli/commands/client/common
#:clpm-cli/interface-defs)
(:import-from #:uiop
#:*stdout*)
(:import-from #:clpm/client
#:*clpm-client-concatenated-source*))
(in-package #:clpm-cli/commands/client/cat)
(defparameter *client-cat-ui*
(adopt:make-interface
:name "clpm client cat"
:summary "Common Lisp Package Manager"
:usage "client cat"
:help "Print the CLPM client source code to stdout"
:contents (list *group-common*)))
(define-cli-command (("client" "cat") *client-cat-ui*) (args options)
(declare (ignore args options))
(uiop:with-safe-io-syntax ()
(let ((*print-case* :downcase))
(write-string *clpm-client-concatenated-source* *stdout*)
(terpri *stdout*)))
t)
......@@ -50,4 +50,5 @@
(:readme-file "README")
(:dependencies-license-file "BUNDLED-LICENSES"))))))))
:in-order-to ((program-op (load-op :clpm-cli))
(load-op (concatenate-source-op :clpm-client))
(asdf-release-ops:perform-program-image-op (load-op :clpm-cli))))
......@@ -11,12 +11,15 @@
(:import-from #:flexi-streams
#:make-in-memory-input-stream)
(:export #:*clpm-client-asd-pathname*
#:*clpm-client-concatenated-source*
#:*clpm-client-tarball-contents*
#:client-asd-pathname))
(in-package #:clpm/client)
(defvar *clpm-client-tarball-contents* nil)
(defparameter *clpm-client-concatenated-source*
(uiop:read-file-string (asdf:output-file 'asdf:concatenate-source-op :clpm-client)))
(defun unpack-client ()
(let ((dir-pathname (clpm-data-pathname `("client"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment