From baed1d3f1bde48aa7ecafed22c6ad4c538ebf5d8 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 23 Jan 2023 23:16:03 +0000 Subject: bin: Add repository top level directory to load path. * bin/tissue (main, pull): Add top level directory of repository to load path. --- bin/tissue | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bin') diff --git a/bin/tissue b/bin/tissue index aaaa122..948460d 100755 --- a/bin/tissue +++ b/bin/tissue @@ -406,6 +406,13 @@ HOSTNAME." (call-with-temporary-directory (lambda (temporary-repository-clone) (clone (git-top-level) temporary-repository-clone) + ;; Add the top level of the git repository to the + ;; load path since there may be user-written + ;; modules in the repository. + ;; TODO: Though not strictly required, it would + ;; be better to remove the added load path once + ;; done. + (add-to-load-path temporary-repository-clone) ;; Index. (unless (file-exists? "xapian") (mkdir "xapian")) @@ -482,6 +489,12 @@ Pull latest from upstream repositories. (display (condition-message c) (current-error-port)) (newline (current-error-port)) (exit #f))) + ;; Add the top level of the git repository to the load path since + ;; there may be user-written modules in the repository. + (match args + ((_ (or "repl" "web-dev") _ ...) + (add-to-load-path (git-top-level))) + (_ #t)) (match args ((_ (or "-h" "--help")) (print-usage)) -- cgit v1.2.3