From e5b2201ec0d9d4f23ace2bb65b38434d4cc9dcbf Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Sep 23 2012 15:17:22 +0000 Subject: Update `Functions/Prepare/prepare_updateEnvironment.sh' file. --- diff --git a/Scripts/Bash/Functions/Prepare/prepare_updateEnvironment.sh b/Scripts/Bash/Functions/Prepare/prepare_updateEnvironment.sh index a1db567..a2a5dc5 100755 --- a/Scripts/Bash/Functions/Prepare/prepare_updateEnvironment.sh +++ b/Scripts/Bash/Functions/Prepare/prepare_updateEnvironment.sh @@ -38,4 +38,13 @@ function prepare_updateEnvironment { # to be able of using different values in their own environments. cp -f $SOURCE $TARGET + # Determine which is the absolute path the script has been + # executed from. This information will be used to construct the + # working copy absolute path and will easy the procedure to follow + # when a new absolute path should be defined for the working copy. + if [[ $0 =~ "${CLI_NAME}.sh$" ]];then + local TCAR_WORKDIR=$(echo "$0" | sed -r 's!^(.+)/trunk.*!\1!') + sed -i -r "s!^(TCAR_WORKDIR=).*!\1${TCAR_WORKDIR}!" ${TARGET} + fi + }