Bug 593162 - Use built scanner from tarball builds
authorColin Walters <walters@verbum.org>
Fri, 4 Sep 2009 18:10:16 +0000 (14:10 -0400)
committerColin Walters <walters@verbum.org>
Fri, 4 Sep 2009 18:10:16 +0000 (14:10 -0400)
Looking for .git/.svn breaks in tarball scenarios; instead just see
if our source directory is named 'tools'.

tools/g-ir-scanner.in

index 4c4d927..d2ef89c 100755 (executable)
@@ -24,10 +24,9 @@ import sys
 
 # This only works on unix systems
 currentdir = os.path.dirname(os.path.abspath(sys.argv[0]))
-basedir = os.path.abspath(os.path.join(currentdir, '..'))
-if (os.path.exists(os.path.join(basedir, '.svn')) or
-    os.path.exists(os.path.join(basedir, '.git'))):
-    path = basedir
+current_name = os.path.basename(currentdir)
+if current_name == 'tools':
+    path = os.path.abspath(os.path.join(currentdir, '..'))
 else:
     # This is a private directory, we don't want to pollute the global
     # namespace.