Copy env.bat file from adm/templates
authorbugmaster <bugmaster@opencascade.com>
Tue, 24 Nov 2015 12:25:47 +0000 (15:25 +0300)
committerbugmaster <bugmaster@opencascade.com>
Tue, 24 Nov 2015 13:11:22 +0000 (16:11 +0300)
genproj.bat
genproj.sh

index 0610af6..79eec0e 100644 (file)
@@ -7,6 +7,8 @@ SET "OLD_PATH=%PATH%"
 
 if exist "%~dp0env.bat" (
   call "%~dp0env.bat"
+) else (
+   type "%~dp0adm\templates\env.bat" | findstr /i /v "__CASROOT__" > "%~dp0env.bat"
 )
 
 set "TCL_EXEC=tclsh.exe"
index 91576ca..2800bde 100755 (executable)
@@ -9,6 +9,9 @@ anOldDyLd="$DYLD_LIBRARY_PATH"
 
 # go to the script directory
 aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
+if [ ! -e "${aScriptPath}/env.sh" ]; then 
+cat ${aScriptPath}/adm/templates/env.sh | sed -e '/__CASROOT__/d' > ${aScriptPath}/env.sh
+fi
 
 aSystem=`uname -s`
 aTarget="$1"