Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Antoine Martin
quickref
Commits
a553124d
Commit
a553124d
authored
Oct 17, 2017
by
Antoine Martin
Browse files
Split build-texis function
parent
a4a4819c
Changes
2
Hide whitespace changes
Inline
Side-by-side
file.lisp
View file @
a553124d
(
in-package
:quickref
)
(
defun
from-homedir
(
relative-path
)
(
merge-pathnames
relative-path
(
user-homedir-pathname
)))
(
defun
clean-directory
(
path
)
(
dolist
(
dir
(
directory
(
merge-pathnames
"*/"
(
truename
path
))))
(
sb-ext:delete-directory
dir
:recursive
t
))
...
...
website.lisp
View file @
a553124d
...
...
@@ -114,24 +114,33 @@
(
format
file
"</body>~%"
)))
(
defun
log-texi-error
(
err
texi
)
(
with-open-file
(
file
(
format
nil
"texi-logfiles/~A.logfile"
(
pathname-name
texi
))
(
with-open-file
(
file
(
format
nil
"texi-logfiles/~A.logfile"
(
pathname-name
texi
))
:direction
:output
:if-exists
:supersede
:if-does-not-exist
:create
)
(
format
file
err
)))
(
defun
build-texis
(
path-to-texis
texinfo-path
)
(
clean-directory
"quickref"
)
(
defun
build-texi
(
texi
makeinfo-path
)
(
let
((
out
(
with-output-to-string
(
out
)
(
sb-ext:run-program
makeinfo-path
(
list
"--html"
(
namestring
texi
)
"-o"
(
namestring
(
from-homedir
(
format
nil
"quickref/~A"
(
pathname-name
texi
))))
"--css-ref"
"/document.css"
"-c"
"TOP_NODE_UP_URL=/"
"--force"
)
:output
out
))))
(
when
(
not
(
string=
out
""
))
(
log-texi-error
out
texi
))))
(
defun
build-texis
(
path-to-texis
makeinfo-path
)
(
let
((
quickref-dir
(
from-homedir
"quickref/"
)))
(
if
(
probe-file
quickref-dir
)
(
clean-directory
quickref-dir
)
(
ensure-directories-exist
quickref-dir
)))
(
let
((
texis
(
get-texi-pathnames
path-to-texis
)))
(
dolist
(
texi
texis
)
(
let
((
out
(
with-output-to-string
(
out
)
(
sb-ext:run-program
texinfo-path
(
list
"--html"
(
namestring
texi
)
"-o"
(
format
nil
"quickref/~A"
(
pathname-name
texi
))
"--css-ref"
"/document.css"
"-c"
"TOP_NODE_UP_URL=/"
"--force"
)
:output
out
))))
(
when
(
not
(
string=
out
""
))
(
log-texi-error
out
texi
))))))
(
build-texi
texi
makeinfo-path
))))
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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