Commit 85931c6f authored by Eric Timmons's avatar Eric Timmons
Browse files

cli less work: bundle init

parent 22d69ec1
......@@ -5,17 +5,14 @@
(uiop:define-package #:clpm-cli/commands/bundle/init
(:use #:cl
#:clpm/bundle
#:clpm-cli/commands/bundle/common
#:clpm-cli/common-args
#:clpm-cli/interface-defs
#:clpm/log)
(:import-from #:adopt))
#:clpm-cli/interface-defs)
(:import-from #:adopt)
(:import-from #:clpm))
(in-package #:clpm-cli/commands/bundle/init)
(setup-logger)
(defparameter *option-bundle-init-asd*
(adopt:make-option
:bundle-init-asds
......@@ -37,7 +34,6 @@
(define-cli-command (("bundle" "init") *bundle-init-ui*) (args options)
(declare (ignore args))
(let* ((clpmfile-pathname (bundle-clpmfile-pathname))
(asds (gethash :bundle-init-asds options)))
(bundle-init clpmfile-pathname :asds asds)
(let ((asds (gethash :bundle-init-asds options)))
(clpm:bundle-init :asds asds)
t))
......@@ -91,10 +91,10 @@ bound to PN's folder."
(lockfile-pathname (clpmfile-lockfile-pathname clpmfile)))
(load-lockfile lockfile-pathname)))
(defun bundle-init (clpmfile-pathname &key (if-exists :error) asds)
(defun bundle-init (&key clpmfile (if-exists :error) asds)
(with-standard-io-syntax
(let ((*print-case* :downcase))
(with-open-file (s clpmfile-pathname :direction :output :if-exists if-exists)
(with-open-file (s (clpmfile-pathname clpmfile) :direction :output :if-exists if-exists)
(write-string ";;; -*- Mode: common-lisp; -*-" s)
(terpri s)
(prin1 '(:api-version "0.3") s)
......@@ -107,7 +107,7 @@ bound to PN's folder."
(dolist (asd asds)
(prin1 `(:asd ,asd) s)
(terpri s)))))
clpmfile-pathname)
(clpmfile-pathname clpmfile))
(defun bundle-install (clpmfile-designator &key (validate (constantly t)) no-resolve)
"Given a clpmfile instance, install all releases from its lock file, creating
......
......@@ -19,7 +19,8 @@
#:clpm/update
#:clpm/version)
;; From bundle
(:export #:bundle-exec)
(:export #:bundle-exec
#:bundle-init)
;; From client
(:export #:client-asd-pathname)
;; From config
......
Markdown is supported
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