Salome HOME
if USER env variable is not defined, search for LOGNAME
[modules/kernel.git] / bin / appli_gen.py
index 5b6ee5411479c0ac8a7a70a27341877a97dee372..ffb36a7f8c9e3abc30eac5d133e10df5ac0b2ebe 100644 (file)
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -19,7 +19,7 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-# See http://www.salome-platform.org or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
 ## \file appli_gen.py
@@ -215,11 +215,17 @@ def install(prefix, config_file, verbose=0):
         shutil.copyfile(filename, os.path.join(home_dir,"config_appli.xml"))
         pass
 
+
+    # Add .salome-completion.sh file
+    shutil.copyfile(os.path.join(appliskel_dir, ".salome-completion.sh"),
+                    os.path.join(home_dir, ".salome-completion.sh"))
+
+
     # Creation of env.d directory
     virtual_salome.mkdir(os.path.join(home_dir,'env.d'))
 
     if _config.has_key("prereq_path") and os.path.isfile(_config["prereq_path"]):
-        shutil.copyfile(_config["prereq_path"], 
+        shutil.copyfile(_config["prereq_path"],
                         os.path.join(home_dir, 'env.d', 'envProducts.sh'))
         pass
     else:
@@ -235,11 +241,10 @@ def install(prefix, config_file, verbose=0):
         pass
 
     if _config.has_key("system_conf_path") and os.path.isfile(_config["system_conf_path"]):
-        shutil.copyfile(_config["system_conf_path"], 
+        shutil.copyfile(_config["system_conf_path"],
                         os.path.join(home_dir, 'env.d', 'envConfSystem.sh'))
         pass
 
-
     # Create environment file: configSalome.sh
     with open(os.path.join(home_dir, 'env.d', 'configSalome.sh'),'w') as f:
         for module in _config.get("modules", []):
@@ -335,7 +340,7 @@ def main():
                       metavar="<configuration file>",
                       help="XML configuration file (default %(default)s)")
 
-    parser.add_argument('-v', '--verbose', action='count', 
+    parser.add_argument('-v', '--verbose', action='count',
                       default=0, help="Increase verbosity")
 
     options = parser.parse_args()