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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 23 Feb 2012 10:08:04 +0100
changeset 1658
c61997a63efe
parent 1655
d2b583fdde1c
child 1659
d5215347c209

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:22:42 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