This commit is contained in:
SANO Masatoshi 2019-05-23 14:59:57 +08:00
parent 59a3918e70
commit 07b973c837

View file

@ -232,15 +232,18 @@ ccl-bin -> (\"ccl-bin\" nil)
owner name
(namestring (ensure-directories-exist dir))))))
(let* ((path/ (merge-pathnames (format nil "~A/~A.tgz" path alias) home))
(dir (merge-pathnames ".expand/" (make-pathname :defaults path/ :name nil :type nil))))
(funcall (intern (string :delete-directory-tree) :uiop) dir :if-does-not-exist :ignore :validate t)
(setq branch (or branch "master"))
(download (format nil "https://github.com/~A/archive/~A.tar.gz" alias branch) path/)
(expand path/ (ensure-directories-exist dir))
(rename-file (first (directory (merge-pathnames "*/" dir)))
(merge-pathnames (format nil "~A/~A/" path alias) home))
(delete-file path/)
(funcall (intern (string :delete-directory-tree) :uiop) dir :if-does-not-exist :ignore :validate t)
(dir (merge-pathnames ".expand/" (make-pathname :defaults path/ :name nil :type nil)))
(dest (merge-pathnames (format nil "~A/~A/" path alias) home)))
(if (probe-file dest)
(format *error-output* "~S is already exist.~%Stop cloning because no git client.~%" dest)
(progn
(funcall (intern (string :delete-directory-tree) :uiop) dir :if-does-not-exist :ignore :validate t)
(setq branch (or branch "master"))
(download (format nil "https://github.com/~A/archive/~A.tar.gz" alias branch) path/)
(expand path/ (ensure-directories-exist dir))
(rename-file (first (directory (merge-pathnames "*/" dir))) dest)
(delete-file path/)
(funcall (intern (string :delete-directory-tree) :uiop) dir :if-does-not-exist :ignore :validate t)))
t)))
(defun config-env ()