diff options
author | Mason Larobina <mason.larobina@gmail.com> | 2009-10-27 03:03:17 +0800 |
---|---|---|
committer | Mason Larobina <mason.larobina@gmail.com> | 2009-10-27 03:03:17 +0800 |
commit | 01d254637ee0f49f797b15f65d99325405fa580b (patch) | |
tree | e66235108bb24e56710bb17ba8a764cc5758075c /examples | |
parent | b9deceb2e1418dd4adee2594bd9b457304885b71 (diff) |
Remove the hard-coded /usr/local/.. path in event_manager.py
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/data/uzbl/scripts/event_manager.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/data/uzbl/scripts/event_manager.py b/examples/data/uzbl/scripts/event_manager.py index 391fb84..aaf3295 100755 --- a/examples/data/uzbl/scripts/event_manager.py +++ b/examples/data/uzbl/scripts/event_manager.py @@ -45,6 +45,12 @@ from traceback import print_exc # ::: Default configuration section :::::::::::::::::::::::::::::::::::::::::: # ============================================================================ +# Automagically set during `make install` +PREFIX = None + +# Check if PREFIX not set and set to default /usr/local/ +if not PREFIX: + PREFIX = '/usr/local/' def xdghome(key, default): '''Attempts to use the environ XDG_*_HOME paths if they exist otherwise @@ -60,6 +66,7 @@ def xdghome(key, default): DATA_DIR = os.path.join(xdghome('DATA', '.local/share/'), 'uzbl/') CACHE_DIR = os.path.join(xdghome('CACHE', '.cache/'), 'uzbl/') + # Config dict (NOT the same as the uzbl.config). config = { 'verbose': False, @@ -69,7 +76,7 @@ config = { 'plugins_ignore': [], 'plugin_dirs': [os.path.join(DATA_DIR, 'plugins/'), - '/usr/local/share/uzbl/examples/data/uzbl/plugins/'], + os.path.join(PREFIX, 'share/uzbl/examples/data/uzbl/plugins/')], 'server_socket': os.path.join(CACHE_DIR, 'event_daemon'), 'pid_file': os.path.join(CACHE_DIR, 'event_daemon.pid'), |