-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.csh
More file actions
executable file
·45 lines (38 loc) · 1.21 KB
/
setup.csh
File metadata and controls
executable file
·45 lines (38 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/tcsh
# Automatically get the directory where this script is located
#K4GeneratorsConfigLocalBuildDir=$(cd -- "$(dirname -- "${(%):-%x}")" && pwd)
# check that we are sourcing
if ("$0" != "-tcsh" && "$0" != "tcsh") then
echo Please use source setup.csh to set up the project
exit
endif
# it's clumsy, but that's C-SHELL which does not allow nested commands
set theCommand=($_)
set thePath=`dirname "$theCommand[2]"`
set K4GeneratorsConfigDir=`cd "$thePath"; pwd`
unset thePath
unset theCommand
set PYTHON3=`where python3`x
if ( "$PYTHON3" == "x" ) then
echo "Python3 is required, but not found!"
exit
endif
set SrcDir=( Generators )
foreach dir ( $SrcDir )
if ( $?PYTHONPATH ) then
setenv PYTHONPATH ${K4GeneratorsConfigDir}/python/${dir}:$PYTHONPATH
else
setenv PYTHONPATH ${K4GeneratorsConfigDir}/python/${dir}
endif
end
# Check if the directory exists
if (! -d "${K4GeneratorsConfigDir}/install/") then
echo Install directory not found!
echo After:
echo cmake ../CMakeLists.txt -DCMAKE_INSTALL_PREFIX=../install
echo Please run:
echo make install
exit 1
endif
# Set executable
alias k4GeneratorsConfig "python3 ${K4GeneratorsConfigDir}/python/main.py"