0026377: Passing Handle objects as arguments to functions as non-const reference...
[occt.git] / genproj.sh
CommitLineData
c7d774c5 1#!/bin/bash
2
3# Helper script to run generation of CBP/XCode projects on Linux / OS X.
4# Running it requires that Tcl should be in the PATH
5
6anOldPath="$PATH"
7anOldLd="$LD_LIBRARY_PATH"
8anOldDyLd="$DYLD_LIBRARY_PATH"
9
10# go to the script directory
11aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
31dfc19f 12if [ ! -e "${aScriptPath}/env.sh" ]; then
13cat ${aScriptPath}/adm/templates/env.sh | sed -e '/__CASROOT__/d' > ${aScriptPath}/env.sh
14fi
c7d774c5 15
16aSystem=`uname -s`
17aTarget="$1"
18anOpt2=$2
19anOpt3=$3
20anOpt4=$4
21anOpt5=$5
22if [ "$aTarget" == "" ]; then
23 aTarget="cbp"
24 if [ "$aSystem" == "Darwin" ]; then aTarget="xcd"; fi;
25fi
26
27if [ ! -e "${aScriptPath}/custom.sh" ]; then
28 tclsh "${aScriptPath}/adm/genconf.tcl"
29fi
30
31if [ ! -e "${aScriptPath}/custom.sh" ]; then
32 echo custom.sh is not created. Run the script again and generate custom.sh
33 exit 1
34fi
35source "${aScriptPath}/custom.sh"
36
37if [ -e "${aScriptPath}/env.sh" ]; then source "${aScriptPath}/env.sh"; fi
38
cb6a2fbc 39tclsh "${aScriptPath}/adm/start.tcl" genproj -path="${aScriptPath}" -target=${aTarget} $anOpt2 $anOpt3 $anOpt4 $anOpt5
c7d774c5 40
41export PATH="$anOldPath"
42export LD_LIBRARY_PATH="$anOldLd"
43export DYLD_LIBRARY_PATH="$anOldDyLd"