diff options
author | Mathieu Lirzin <mthl@gnu.org> | 2020-05-08 18:06:20 +0200 |
---|---|---|
committer | Mathieu Lirzin <mthl@gnu.org> | 2020-05-17 11:51:47 +0200 |
commit | 6ae322468832759c1950779d6faff0fa550580ce (patch) | |
tree | 101e60918693b24a90bdfcf3e77f7f36f5ff2480 | |
parent | 39857ae8442853e4f7d89116da400ca24d58ba7b (diff) | |
download | mcron-6ae322468832759c1950779d6faff0fa550580ce.tar.gz mcron-6ae322468832759c1950779d6faff0fa550580ce.tar.bz2 mcron-6ae322468832759c1950779d6faff0fa550580ce.zip |
scripts: Separate build/install directory context
This prevents installed modules to interfere with the ones from the
build directory.
* src/cron.in: Augment Guile load paths with install directories only
when MCRON_UNINSTALLED environment variable is not set.
* src/crontab.in: Likewise.
* src/mcron.in: Likewise.
-rw-r--r-- | src/cron.in | 8 | ||||
-rw-r--r-- | src/crontab.in | 6 | ||||
-rw-r--r-- | src/mcron.in | 8 |
3 files changed, 14 insertions, 8 deletions
diff --git a/src/cron.in b/src/cron.in index 97d49b4..25ad273 100644 --- a/src/cron.in +++ b/src/cron.in @@ -2,7 +2,9 @@ -*- scheme -*- !# -(set! %load-path (cons "%modsrcdir%" %load-path)) -(set! %load-compiled-path (cons "%modbuilddir%" %load-compiled-path)) -(use-modules (mcron scripts cron)) +(unless (getenv "MCRON_UNINSTALLED") + (set! %load-path (cons "%modsrcdir%" %load-path)) + (set! %load-compiled-path (cons "%modbuilddir%" %load-compiled-path))) + +(use-modules (mcron scripts cron)) (main) diff --git a/src/crontab.in b/src/crontab.in index fa31878..dad0dd2 100644 --- a/src/crontab.in +++ b/src/crontab.in @@ -2,6 +2,8 @@ -*- scheme -*- !# -(set! %load-path (cons "%modsrcdir%" %load-path)) -(set! %load-compiled-path (cons "%modbuilddir%" %load-compiled-path)) +(unless (getenv "MCRON_UNINSTALLED") + (set! %load-path (cons "%modsrcdir%" %load-path)) + (set! %load-compiled-path (cons "%modbuilddir%" %load-compiled-path))) + ((@ (mcron scripts crontab) main)) diff --git a/src/mcron.in b/src/mcron.in index 4519ad0..268743c 100644 --- a/src/mcron.in +++ b/src/mcron.in @@ -2,7 +2,9 @@ -*- scheme -*- !# -(set! %load-path (cons "%modsrcdir%" %load-path)) -(set! %load-compiled-path (cons "%modbuilddir%" %load-compiled-path)) -(use-modules (mcron scripts mcron)) +(unless (getenv "MCRON_UNINSTALLED") + (set! %load-path (cons "%modsrcdir%" %load-path)) + (set! %load-compiled-path (cons "%modbuilddir%" %load-compiled-path))) + +(use-modules (mcron scripts mcron)) (main) |