Commit ba2da38d authored by Antoine Martin's avatar Antoine Martin
Browse files

Add clean-or-create function

parent af2db3d1
......@@ -27,3 +27,8 @@
(namestring
(merge-pathnames "software/"
(ql-dist:base-directory (ql-dist:dist "quicklisp")))))
(defun clean-or-create (directory)
(if (probe-file directory)
(clean-directory directory)
(ensure-directories-exist directory)))
......@@ -115,6 +115,7 @@
(format file "</body>~%"))))
(defun log-texi-error (err texi)
(clean-or-create (from-homedir "texi-logfiles/"))
(let ((filepathname (from-homedir
(format nil "texi-logfiles/~A.log"
(pathname-name texi)))))
......@@ -140,10 +141,7 @@
(log-texi-error out texi))))
(defun build-texis (makeinfo-path)
(let ((quickref-dir (from-homedir "quickref/")))
(if (probe-file quickref-dir)
(clean-directory quickref-dir)
(ensure-directories-exist quickref-dir)))
(clean-or-create (from-homedir "quickref/"))
(let ((texis (get-texi-pathnames)))
(dolist (texi texis)
(build-texi texi makeinfo-path))))
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