diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-06-11 14:31:58 +0100 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-06-11 14:31:58 +0100 |
commit | 8920f60cdd0f6436bd0a87928f284cacf702edaa (patch) | |
tree | c93299ec85315c290408e60461020e45ebee4373 | |
parent | 9f6bae941c397357109e9b09cf7849c31a42423e (diff) | |
download | morph-8920f60cdd0f6436bd0a87928f284cacf702edaa.tar.gz |
Add way for user to specify additional plugin directories
-rw-r--r-- | morph.1.in | 7 | ||||
-rwxr-xr-x | morphlib/app.py | 5 |
2 files changed, 12 insertions, 0 deletions
@@ -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.''' |