Changed the install script to deal with installations initiated from a directory not containing the install script. 5_2_x

Thu, 23 Feb 2012 10:08:04 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 23 Feb 2012 10:08:04 +0100
branch
5_2_x
changeset 1657
53b34dfe1fa0
parent 1656
a1f6aa6e36bf
child 1660
57f2bd52deb7

Changed the install script to deal with installations initiated from a directory not containing the install script.

install.py file | annotate | diff | comparison | revisions
--- a/install.py	Wed Feb 22 19:23:54 2012 +0100
+++ b/install.py	Thu Feb 23 10:08:04 2012 +0100
@@ -21,6 +21,7 @@
 
 # Define the globals.
 progName = None
+currDir = os.getcwd()
 modDir = None
 pyModDir = None
 platBinDir = None
@@ -45,9 +46,13 @@
     """
     Exit the install script.
     """
+    global currDir
+    
     if sys.platform.startswith("win"):
         input("Press enter to continue...")
     
+    os.chdir(currDir)
+    
     sys.exit(rcode)
 
 
@@ -923,6 +928,8 @@
     global sourceDir, configName
     
     progName = os.path.basename(argv[0])
+    
+    os.chdir(os.path.dirname(argv[0]))
 
     initGlobals()
 

eric ide

mercurial