load user config, make install and uninstall
This commit is contained in:
@@ -3,3 +3,11 @@ sbcl:
|
|||||||
|
|
||||||
ecl:
|
ecl:
|
||||||
ecl --norc --load build.lisp
|
ecl --norc --load build.lisp
|
||||||
|
|
||||||
|
install:
|
||||||
|
cp lspack /usr/local/bin/
|
||||||
|
cp doc/lspack.1 /usr/local/share/man/man1/
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm /usr/local/bin/lspack
|
||||||
|
rm /usr/local/share/man/man1/lspack.1
|
||||||
|
|||||||
+14
-3
@@ -1,8 +1,19 @@
|
|||||||
* v0.0.4
|
* v0.0.4
|
||||||
|
|
||||||
- [ ] Load user config from $XDG_CONFIG_HOME/lspack/config.lisp
|
- [X] Load user config from $XDG_CONFIG_HOME/lspack/config.lisp (v.0.0.6)
|
||||||
- [ ] Load licenses at compile time
|
- [-] Load licenses at compile time
|
||||||
- [X] SBCL (v0.0.5)
|
- [X] SBCL (v0.0.5)
|
||||||
- [ ] ECL
|
- [ ] ECL
|
||||||
- [ ] Install exe, licenses, manpage
|
- [X] Install exe, manpage (v.0.0.6)
|
||||||
|
- installing licenses may not be needed if they will be compiled anyway
|
||||||
- [X] Compile with ECL (v0.0.5)
|
- [X] Compile with ECL (v0.0.5)
|
||||||
|
|
||||||
|
* v0.0.5
|
||||||
|
|
||||||
|
depending on user config
|
||||||
|
|
||||||
|
- [ ] Create a README as either .md or .org
|
||||||
|
- [ ] Create exe and test defsystems
|
||||||
|
- [ ] Allow creation of project types with different default values
|
||||||
|
and behaviour
|
||||||
|
- [ ] Allow those types to :depends-on default libraries
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
:author "Emre Akan"
|
:author "Emre Akan"
|
||||||
:description "Quickstart Common Lisp projects"
|
:description "Quickstart Common Lisp projects"
|
||||||
:license "GPL-3.0"
|
:license "GPL-3.0"
|
||||||
:version "0.0.5"
|
:version "0.0.6"
|
||||||
:depends-on ("uiop")
|
:depends-on ("uiop")
|
||||||
:pathname "src/"
|
:pathname "src/"
|
||||||
:serial t
|
:serial t
|
||||||
|
|||||||
+2
-6
@@ -70,13 +70,9 @@
|
|||||||
(if (null (root argument))
|
(if (null (root argument))
|
||||||
(uiop:ensure-directory-pathname (name argument))
|
(uiop:ensure-directory-pathname (name argument))
|
||||||
(uiop:ensure-directory-pathname (root argument))))
|
(uiop:ensure-directory-pathname (root argument))))
|
||||||
(when (null (author argument))
|
(when (stringp (license argument))
|
||||||
(setf (author argument) lspack:*default-author*))
|
|
||||||
(let ((license (license argument)))
|
|
||||||
(setf (license argument)
|
(setf (license argument)
|
||||||
(cond ((null license) lspack:*default-license*)
|
(intern (string-upcase (license argument)) :keyword)))
|
||||||
((stringp license) (intern (string-upcase license) :keyword))
|
|
||||||
(t lspack:*default-license*))))
|
|
||||||
argument)
|
argument)
|
||||||
|
|
||||||
(defun main ()
|
(defun main ()
|
||||||
|
|||||||
+14
-5
@@ -117,14 +117,23 @@
|
|||||||
(project-ensure-source-directory project)
|
(project-ensure-source-directory project)
|
||||||
(project-create-package project))
|
(project-create-package project))
|
||||||
|
|
||||||
(defun start (name project-root &key (author *default-author*) (description "") (license *default-license*))
|
(defun load-config ()
|
||||||
"Intended to be called interactively by the user at the repl"
|
(let ((*package* (find-package :lspack))
|
||||||
|
(config (uiop:xdg-config-home "lspack/config.lisp")))
|
||||||
|
(format *error-output* "~&Loading ~S..." config)
|
||||||
|
(finish-output *error-output*)
|
||||||
|
(if (null (load config :if-does-not-exist nil))
|
||||||
|
(format *error-output* " failed~%" config)
|
||||||
|
(format *error-output* " ok~%" config))))
|
||||||
|
|
||||||
|
(defun start (name project-root &key author (description "") license)
|
||||||
|
"Creates commonly used files for a Common Lisp project from given arguments and loaded configuration. Can be called interactively by the user at the repl."
|
||||||
|
(load-config)
|
||||||
(let ((project (make-instance
|
(let ((project (make-instance
|
||||||
'<project>
|
'<project>
|
||||||
:project-root (uiop:ensure-directory-pathname project-root)
|
:project-root (uiop:ensure-directory-pathname project-root)
|
||||||
:project-name name
|
:project-name name
|
||||||
:project-author author
|
:project-author (or author *default-author*)
|
||||||
:project-description description
|
:project-description description
|
||||||
:project-license license)))
|
:project-license (or license *default-license*))))
|
||||||
(project-start project)))
|
(project-start project)))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user