From ef213c41ace0c60eeb96ae9fa4d6db4f234926c3 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 25 Dec 2022 19:01:20 +0000 Subject: web: static: Deprecate with-current-directory. with-current-directory is the exact same as call-with-current-directory from (tissue utils). * tissue/web/static.scm (with-current-directory): Delete function. (build-website): Replace with-current-directory with call-with-current-directory. --- tissue/web/static.scm | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'tissue') diff --git a/tissue/web/static.scm b/tissue/web/static.scm index ffe7c8a..fbef99e 100644 --- a/tissue/web/static.scm +++ b/tissue/web/static.scm @@ -121,14 +121,6 @@ stylesheet is included in the generated web pages." (evaluate-ast-from-port in #:reader reader) engine))))) -(define (with-current-directory directory thunk) - "Change current directory to DIRECTORY, execute THUNK and restore -original current directory." - (let ((previous-current-directory (getcwd))) - (dynamic-wind (const #t) - thunk - (cut chdir previous-current-directory)))) - (define* (build-website repository-top-level output-directory files #:key (log-port (current-error-port))) "Export git repository with REPOSITORY-TOP-LEVEL to OUTPUT-DIRECTORY @@ -150,6 +142,6 @@ Log to LOG-PORT. When LOG-PORT is #f, do not log." (make-directories (dirname output-file)) (call-with-output-file output-file (lambda (port) - (with-current-directory repository-top-level - (cut (file-writer file) port)))))) + (call-with-current-directory repository-top-level + (cut (file-writer file) port)))))) files)) -- cgit v1.2.3