aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2023-01-06 22:53:47 +0000
committerArun Isaac2023-01-08 13:01:36 +0000
commitc8ed0bc40f20e790a7dfa7204d67a946b7ff6818 (patch)
tree08c94a343f5440aca4d9e88b8b2880632fe3374b
parenteb7141b9f8ce0043098bba19e490418ca27077f6 (diff)
downloadgn-machines-c8ed0bc40f20e790a7dfa7204d67a946b7ff6818.tar.gz
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.
-rw-r--r--genenetwork-development.scm7
1 files changed, 6 insertions, 1 deletions
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))