Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
clpm
clpm
Commits
b3764562
Commit
b3764562
authored
Feb 23, 2020
by
Eric Timmons
Browse files
Add client subcommand to CLPM
parent
8cf36b67
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/clpm/cli/client.lisp
0 → 100644
View file @
b3764562
;;;; clpm client
;;;;
;;;; This software is part of CLPM. See README.org for more information. See
;;;; LICENSE for license information.
(
uiop:define-package
#:clpm/cli/client
(
:use
#:cl
#:clpm/cli/client/common
#:clpm/cli/client/rc
))
(
in-package
#:clpm/cli/client
)
src/clpm/cli/client/common.lisp
0 → 100644
View file @
b3764562
;;;; Client CLI common functions
;;;;
;;;; This software is part of CLPM. See README.org for more information. See
;;;; LICENSE for license information.
(
uiop:define-package
#:clpm/cli/client/common
(
:use
#:cl
#:clpm/cli/common-args
#:clpm/cli/subcommands
)
(
:import-from
#:adopt
))
(
in-package
#:clpm/cli/client/common
)
(
defparameter
*default-ui*
(
adopt:make-interface
:name
"clpm client"
:summary
"Common Lisp Package Manager"
:usage
"client [options] subcommand"
:help
"Common Lisp Package Manager"
:contents
(
list
*group-common*
)))
(
define-cli-command-folder
((
"client"
)
*default-ui*
))
src/clpm/cli/client/rc.lisp
0 → 100644
View file @
b3764562
;;;; clpm config info
;;;;
;;;; This software is part of CLPM. See README.org for more information. See
;;;; LICENSE for license information.
(
uiop:define-package
#:clpm/cli/client/rc
(
:use
#:cl
#:clpm/cli/common-args
#:clpm/cli/client/common
#:clpm/cli/subcommands
#:clpm/client
#:named-readtables
)
(
:import-from
#:uiop
#:*stdout*
)
(
:import-from
#:cl-interpol
))
(
in-package
#:clpm/cli/client/rc
)
(
in-readtable
:interpol-syntax
)
(
defparameter
*option-quicklisp-alternative*
(
adopt:make-option
:quicklisp-alternative
:long
"quicklisp-alternative"
:help
"Print configuration as a Quicklisp alternative."
:reduce
(
constantly
t
)))
(
defparameter
*client-rc-ui*
(
adopt:make-interface
:name
"clpm client rc"
:summary
"Common Lisp Package Manager"
:usage
"client rc [options]"
:help
"Common Lisp Package Manager"
:contents
(
list
*group-common*
*option-quicklisp-alternative*
)))
(
defun
quicklisp-alternative-rc
()
#
?
";;; Use CLPM as a quicklisp alternative (missing systems are silently installed
;;; on demand).
(require \"asdf\")
#-clpm-client
(progn
(asdf:load-asd #p\"${(client-asd-pathname)}\")
(asdf:load-system \"clpm-client\")
(setf (symbol-value (uiop:find-symbol* :*clpm-system-not-found-behavior* :clpm-client)) :install-with-deps)
(uiop:symbol-call :clpm-client :activate-clpm-asdf-integration))"
)
(
defun
default-rc
()
#
?
";;; Load clpm-client with default values by calling cl-user::load-clpm-client.
(require \"asdf\")
(defun load-clpm-client ()
(asdf:load-asd #p\"${(client-asd-pathname)}\")
(asdf:load-system \"clpm-client\")
(uiop:symbol-call :clpm-client :activate-clpm-asdf-integration))"
)
(
define-cli-command
((
"client"
"rc"
)
*client-rc-ui*
)
(
arguments
options
)
(
uiop:with-safe-io-syntax
()
(
let
((
*print-case*
:downcase
))
(
if
(
gethash
:quicklisp-alternative
options
)
(
write-string
(
quicklisp-alternative-rc
)
*stdout*
)
(
write-string
(
default-rc
)
*stdout*
))
(
terpri
*stdout*
)))
t
)
src/clpm/clpm.lisp
View file @
b3764562
...
...
@@ -6,6 +6,7 @@
(
uiop:define-package
#:clpm/clpm
(
:use
#:cl
#:clpm/cli/bundle
#:clpm/cli/client
#:clpm/cli/config
#:clpm/cli/context
#:clpm/cli/entry
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment