Browse Source

Ensure install.sh is called with proper working directory

Hamilton Turner 11 years ago
parent
commit
e82ba498dc
1 changed files with 7 additions and 0 deletions
  1. 7 0
      toolset/setup/linux/installer.py

+ 7 - 0
toolset/setup/linux/installer.py

@@ -66,6 +66,10 @@ class Installer:
       test_rel_install_dir=os.path.relpath(test_install_dir, self.fwroot)
       if not os.path.exists(test_install_dir):
         os.makedirs(test_install_dir)
+      
+      # Move into the proper working directory
+      previousDir = os.getcwd()
+      os.chdir(test_dir)
 
       # Load profile for this installation
       profile="%s/bash_profile.sh" % test_dir
@@ -95,6 +99,9 @@ class Installer:
           bash_functions_path, test_rel_install_file),
           cwd=test_install_dir)
 
+      # Move back to previous directory
+      os.chdir(previousDir)
+
     self.__run_command("sudo apt-get -y autoremove");    
 
     print("\nINSTALL: Finished installing server software\n")