summaryrefslogtreecommitdiff
path: root/tools/g-ir-scanner.in
diff options
context:
space:
mode:
Diffstat (limited to 'tools/g-ir-scanner.in')
-rwxr-xr-xtools/g-ir-scanner.in8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/g-ir-scanner.in b/tools/g-ir-scanner.in
index 943d9baa..86866c93 100755
--- a/tools/g-ir-scanner.in
+++ b/tools/g-ir-scanner.in
@@ -29,11 +29,9 @@ if 'GI_SCANNER_DEBUG' in os.environ:
pdb.pm()
sys.excepthook = on_exception
-# This only works on unix systems
-currentdir = os.path.dirname(os.path.abspath(sys.argv[0]))
-current_name = os.path.basename(currentdir)
-if current_name == 'tools':
- path = os.path.abspath(os.path.join(currentdir, '..'))
+srcdir=os.getenv('UNINSTALLED_INTROSPECTION_SRCDIR', None)
+if srcdir is not None:
+ path = srcdir
else:
# This is a private directory, we don't want to pollute the global
# namespace.