summaryrefslogtreecommitdiff
path: root/scripts/update_version_files.py
diff options
context:
space:
mode:
authorAndrew Meadows <andrew@lindenlab.com>2008-10-10 16:04:02 +0000
committerAndrew Meadows <andrew@lindenlab.com>2008-10-10 16:04:02 +0000
commit5f3875018ee9977917d6fff5f2c2cf87db41ce3e (patch)
tree63ae291bed617d557b5c745a614a2e1cf21e9469 /scripts/update_version_files.py
parent4ff16b735f59326514ad92ec38e3261cd996e05c (diff)
svn merge -r99056:99248 svn+ssh://svn.lindenlab.com/svn/linden/branches/andrew/gcc-4-003-for-merge
Diffstat (limited to 'scripts/update_version_files.py')
-rwxr-xr-xscripts/update_version_files.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/update_version_files.py b/scripts/update_version_files.py
index 528eedc23a..87a3b6f389 100755
--- a/scripts/update_version_files.py
+++ b/scripts/update_version_files.py
@@ -5,10 +5,21 @@
#
import sys
-import os
import os.path
+# Look for indra/lib/python in all possible parent directories ...
+# This is an improvement over the setup-path.py method used previously:
+# * the script may blocated anywhere inside the source tree
+# * it doesn't depend on the current directory
+# * it doesn't depend on another file being present.
+
root = os.path.abspath(__file__)
+# always insert the directory of the script in the search path
+dir = os.path.dirname(root)
+if dir not in sys.path:
+ sys.path.insert(0, dir)
+
+# Now go look for indra/lib/python in the parent dies
while root != os.path.sep:
root = os.path.dirname(root)
dir = os.path.join(root, 'indra', 'lib', 'python')
@@ -20,7 +31,7 @@ else:
print >>sys.stderr, "This script is not inside a valid installation."
sys.exit(1)
-import getopt, sys, os, re, commands
+import getopt, os, re, commands
from indra.util import llversion
svn = os.path.expandvars("${SVN}")