diff options
author | James Cook <james@lindenlab.com> | 2008-11-19 23:26:29 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2008-11-19 23:26:29 +0000 |
commit | 2a44e81675d22aa5ed0844d5a4ac18bb9bd49f64 (patch) | |
tree | 595dd4b8b7beac938fc0e14ee075e5cfeb1f129b /scripts/update_version_files.py | |
parent | 2d2d427158ca2465e2d70d84b4499cab57e2e208 (diff) |
QAR-1018 Lightweight Windows Setup App (windows-setup-3). svn merge -r102882:102883 svn+ssh://svn.lindenlab.com/svn/linden/branches/windows-setup/windows-setup-3-merge
Diffstat (limited to 'scripts/update_version_files.py')
-rwxr-xr-x | scripts/update_version_files.py | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/scripts/update_version_files.py b/scripts/update_version_files.py index 87a3b6f389..9081941521 100755 --- a/scripts/update_version_files.py +++ b/scripts/update_version_files.py @@ -13,23 +13,26 @@ import os.path # * 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') - if os.path.isdir(dir): - if dir not in sys.path: - sys.path.insert(0, dir) - break -else: - print >>sys.stderr, "This script is not inside a valid installation." - sys.exit(1) +def add_indra_lib_path(): + root = os.path.realpath(__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') + if os.path.isdir(dir): + if dir not in sys.path: + sys.path.insert(0, dir) + break + else: + print >>sys.stderr, "This script is not inside a valid installation." + sys.exit(1) + +add_indra_lib_path() import getopt, os, re, commands from indra.util import llversion |