diff options
author | Arun Isaac | 2022-03-18 16:11:06 +0530 |
---|---|---|
committer | Arun Isaac | 2022-03-18 16:24:31 +0530 |
commit | d2bc79bfd01fededb37aa5780bd970e92639cb45 (patch) | |
tree | 7a586ab2f961121999c4eb050ca1c626f2803360 /bin | |
parent | 40b6dccc645d5f51cca1a6235db45302f13fdfac (diff) | |
download | tissue-d2bc79bfd01fededb37aa5780bd970e92639cb45.tar.gz tissue-d2bc79bfd01fededb37aa5780bd970e92639cb45.tar.lz tissue-d2bc79bfd01fededb37aa5780bd970e92639cb45.zip |
bin: Abstract out the loading of the configuration file.
* bin/tissue (load-config): New function.
(tissue-web): Use load-config.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/tissue | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -349,6 +349,15 @@ Show the text of issue #ISSUE-NUMBER. port))) (raise (issue-file-not-found-error issue-file))))))) +(define load-config + (memoize-thunk + (lambda () + "Load configuration and return <tissue-configuration> object." + (load (string-append (call-with-input-pipe + get-line + "git" "rev-parse" "--show-toplevel") + "/tissue.scm"))))) + (define tissue-web (match-lambda* (("--help") @@ -358,10 +367,7 @@ Export the repository as a website to OUTPUT-DIRECTORY. " (command-line-program))) ((output-directory) - (let ((config (load (string-append (call-with-input-pipe - get-line - "git" "rev-parse" "--show-toplevel") - "/tissue.scm")))) + (let ((config (load-config))) (build-website output-directory #:title (tissue-configuration-project config) #:css (tissue-configuration-web-css config) |