Salome HOME
Script to create a backup copy of the 'env_build.csh', 'env_build.sh', 'env_products...
[tools/install.git] / config_files / backupEnv.sh
diff --git a/config_files/backupEnv.sh b/config_files/backupEnv.sh
new file mode 100755 (executable)
index 0000000..31997c8
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : backupEnv.sh
+#  Created   : Thu Dec 18 12:01:00 2002
+#  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
+#  Project   : SALOME
+#  Module    : Installation Wizard
+#  Copyright : 2002-2007 CEA
+#
+#  This script is the part of the SALOME installation procedure.
+#
+#  The script checks available disk space. Returns 1 if there is no available 
+#  space on the disc.
+#
+#  Usage: backupEnv <directory>
+#
+####################################################################################
+
+install_root=$1
+env_sequence="env_build.csh env_build.sh env_products.csh env_products.sh"
+
+for file_name in $env_sequence ; do
+    file=$install_root/$file_name
+    if [ -e $file ] ; then
+       cp ${file} ${file}_`date +%F_%T`
+    fi
+done
+exit 0