diff options
author | Arun Isaac | 2023-01-29 00:18:27 +0000 |
---|---|---|
committer | Arun Isaac | 2023-01-29 00:18:27 +0000 |
commit | f9632ed5936a42999a938553a5226d769cd3e522 (patch) | |
tree | 03f82f05b4240b6cdec2fdbd17b91fb72867d368 /bin | |
parent | 1bd344bf4c0c31dff379a1e6f280ae715a0e328b (diff) | |
download | tissue-f9632ed5936a42999a938553a5226d769cd3e522.tar.gz tissue-f9632ed5936a42999a938553a5226d769cd3e522.tar.lz tissue-f9632ed5936a42999a938553a5226d769cd3e522.zip |
bin: Do not change into state directory when checking out.
Since the checkouts are created in the system-dependent temporary
directory, we no longer need to change into the state directory.
* bin/tissue (tissue-web): Do not change into state directory when
checking out.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/tissue | 44 |
1 files changed, 21 insertions, 23 deletions
@@ -268,29 +268,27 @@ Serve repositories specified in CONFIG-FILE over HTTP. (start-repl (assq-ref args 'listen-repl))) (let* ((state-directory (assq-ref args 'state-directory)) (hosts (assq-ref args 'hosts))) - (call-with-current-directory state-directory - (lambda () - (call-with-temporary-checkouts (map (match-lambda - ((name _ ...) - (string-append state-directory "/" name "/repository"))) - hosts) - (lambda checkouts - (start-web-server (listen->socket-address (assq-ref args 'listen)) - (map (match-lambda* - (((name parameters ...) repository-directory) - ;; Add CSS, repository directory, - ;; website directory, xapian - ;; directory settings for each host. - (parameterize ((%current-git-repository - (repository-open repository-directory))) - (cons name - `((project . ,(load-config)) - (repository-directory . ,repository-directory) - (website-directory . ,(string-append state-directory "/" name "/website")) - (xapian-directory . ,(string-append state-directory "/" name "/xapian")) - ,@parameters))))) - hosts - checkouts))))))))))) + (call-with-temporary-checkouts (map (match-lambda + ((name _ ...) + (string-append state-directory "/" name "/repository"))) + hosts) + (lambda checkouts + (start-web-server (listen->socket-address (assq-ref args 'listen)) + (map (match-lambda* + (((name parameters ...) repository-directory) + ;; Add CSS, repository directory, + ;; website directory, xapian + ;; directory settings for each host. + (parameterize ((%current-git-repository + (repository-open repository-directory))) + (cons name + `((project . ,(load-config)) + (repository-directory . ,repository-directory) + (website-directory . ,(string-append state-directory "/" name "/website")) + (xapian-directory . ,(string-append state-directory "/" name "/xapian")) + ,@parameters))))) + hosts + checkouts))))))))) (define tissue-web-dev (match-lambda* |