From c8ed0bc40f20e790a7dfa7204d67a946b7ff6818 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 6 Jan 2023 22:53:47 +0000 Subject: Clean up xapian build directory if previous build failed to. * genenetwork-development.scm (build-xapian-index-gexp): Clean up xapian build directory if previous build failed to. --- genenetwork-development.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/genenetwork-development.scm b/genenetwork-development.scm index 86fc1df..edf59d6 100644 --- a/genenetwork-development.scm +++ b/genenetwork-development.scm @@ -228,7 +228,12 @@ genenetwork3 source from the latest commit of @var{project}." (xapian-build-directory (string-append #$%xapian-directory "/build"))) (dynamic-wind - (cut mkdir xapian-build-directory) + (lambda () + ;; Delete xapian-build-directory in case previous + ;; build exited without cleaning up. + (when (file-exists? xapian-build-directory) + (delete-file-recursively xapian-build-directory)) + (mkdir xapian-build-directory)) (lambda () ;; Build xapian index. (setenv "PYTHONPATH" (getcwd)) -- cgit v1.2.3