summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-06-11 14:31:58 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-06-11 14:31:58 +0100
commit8920f60cdd0f6436bd0a87928f284cacf702edaa (patch)
treec93299ec85315c290408e60461020e45ebee4373
parent9f6bae941c397357109e9b09cf7849c31a42423e (diff)
downloadmorph-8920f60cdd0f6436bd0a87928f284cacf702edaa.tar.gz
Add way for user to specify additional plugin directories
-rw-r--r--morph.1.in7
-rwxr-xr-xmorphlib/app.py5
2 files changed, 12 insertions, 0 deletions
diff --git a/morph.1.in b/morph.1.in
index 6ee9d14e..38bff721 100644
--- a/morph.1.in
+++ b/morph.1.in
@@ -84,6 +84,13 @@ Otherwise,
.B morph
sets the environment variable to
.BR false .
+.TP
+.B MORPH_PLUGIN_PATH
+.B morph
+looks for plugins additionally in the directories given in this variable.
+Syntax is same as for
+.B PATH
+(i.e., colon delimited pathnames).
.PP
The
.BR cliapp (5)
diff --git a/morphlib/app.py b/morphlib/app.py
index a22a9d51..20934dd7 100755
--- a/morphlib/app.py
+++ b/morphlib/app.py
@@ -142,6 +142,11 @@ class Morph(cliapp.Application):
'build things in a staging chroot '
'(require real root to use)')
+ def setup_plugin_manager(self):
+ cliapp.Application.setup_plugin_manager(self)
+ s = os.environ.get('MORPH_PLUGIN_PATH', '')
+ self.pluginmgr.locations += s.split(':')
+
def _itertriplets(self, args):
'''Generate repo, ref, filename triples from args.'''