From: akl Date: Fri, 27 Jul 2007 13:41:07 +0000 (+0000) Subject: Script to create a backup copy of the 'env_build.csh', 'env_build.sh', 'env_products... X-Git-Tag: IMP_BR_4~55 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fafb14152549a93a8afb11416accaad3b3c4bfb2;p=tools%2Finstall.git Script to create a backup copy of the 'env_build.csh', 'env_build.sh', 'env_products.csh' and 'env_products.sh' environment files before replacing to prevent its destruction. --- diff --git a/config_files/backupEnv.sh b/config_files/backupEnv.sh new file mode 100755 index 0000000..31997c8 --- /dev/null +++ b/config_files/backupEnv.sh @@ -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 +# +#################################################################################### + +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