[gnome-shell] jhbuild wrapper: Clean up environment variable logic
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] jhbuild wrapper: Clean up environment variable logic
- Date: Fri, 27 Apr 2012 19:49:16 +0000 (UTC)
commit 64aa729eddb54d5fa5f416241847900249d2af06
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Apr 26 16:28:16 2012 -0400
jhbuild wrapper: Clean up environment variable logic
Lots of things here were unused. First, we don't need to calculate
the js_dir when not running from the source tree, which makes the
branch mostly empty, meaning we can merge the two branches.
src/gnome-shell-jhbuild.in | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/src/gnome-shell-jhbuild.in b/src/gnome-shell-jhbuild.in
index e695e58..f8e9c42 100755
--- a/src/gnome-shell-jhbuild.in
+++ b/src/gnome-shell-jhbuild.in
@@ -64,26 +64,22 @@ def get_running_session_environs():
def start_shell():
self_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
- if os.path.exists(os.path.join(self_dir, 'gnome-shell-jhbuild.in')):
- running_from_source_tree = True
+ running_from_source_tree = os.path.exists(os.path.join(self_dir, 'gnome-shell-jhbuild.in'))
+
+ # Set up environment
+ env = dict(os.environ)
+ if running_from_source_tree:
top_dir = os.path.dirname(self_dir)
- js_dir = os.path.join(top_dir, "js")
- data_dir = os.path.join(top_dir, "data")
+
typelib_dir = os.path.join(top_dir, "src")
if 'GI_TYPELIB_PATH' in os.environ:
typelib_dir += ':%s' % (os.environ['GI_TYPELIB_PATH'],)
- else:
- running_from_source_tree = False
- js_dir = os.path.join('@pkgdatadir@', 'js')
- # Set up environment
- env = dict(os.environ)
- if running_from_source_tree:
- env.update({'GNOME_SHELL_JS' : js_dir,
+ env.update({'GNOME_SHELL_JS' : os.path.join(top_dir, "js"),
'GNOME_SHELL_BINDIR' : self_dir,
'GI_TYPELIB_PATH' : typelib_dir,
- 'GNOME_SHELL_DATADIR' : data_dir,
- 'GSETTINGS_SCHEMA_DIR' : data_dir })
+ 'GNOME_SHELL_DATADIR' : os.path.join(top_dir, "data"),
+ 'GSETTINGS_SCHEMA_DIR' : os.path.join(top_dir, "data") })
args = []
if options.debug:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]