-
Notifications
You must be signed in to change notification settings - Fork 9
/
GetToolFramework.sh
executable file
·92 lines (74 loc) · 1.87 KB
/
GetToolFramework.sh
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
init=1
toolframework=1
final=1
setup=1
threads=`nproc --all`
while [ ! $# -eq 0 ]
do
case "$1" in
--help | -h)
echo "This script should be run once after initially cloning the ToolApplication repository. It retrieves the ToolFrameworkCore repository that provides the core framework on which your application will be built."
exit
;;
--no_init )
echo "Installing Applicaiton without creating Dependancy Folder"
init=0;
;;
--no_toolframework )
echo "Installing dependancies without ToolFramework"
toolframework=0
;;
--no_final )
echo "Installing ToolFramework without compiling Applcation"
final=0
;;
--Final )
echo "Compiling Apliciaion"
init=0
toolframework=0
;;
esac
shift
done
if [ $init -eq 1 ]
then
mkdir Dependencies
fi
cd Dependencies
if [ $toolframework -eq 1 ]
then
git clone https://github.com/ToolFramework/ToolFrameworkCore.git
cd ToolFrameworkCore
make clean
make -j $threads
export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
cd ../
fi
cd ../
if [ $final -eq 1 ]
then
echo "current directory"
echo `pwd`
if [ $setup -eq 1 ]
then
cp -r ./Dependencies/ToolFrameworkCore/DataModel/* ./DataModel
cp -r ./Dependencies/ToolFrameworkCore/UserTools/* ./UserTools
cp -r ./Dependencies/ToolFrameworkCore/configfiles/* ./configfiles
mkdir src
cp ./Dependencies/ToolFrameworkCore/src/main.cpp ./src/
cp ./Dependencies/ToolFrameworkCore/Application/* ./
git add DataModel/
git add UserTools/*
git add configfiles/*
git add ./Makefile
git add ./CMakeLists.txt
git add ./Setup.sh
git add ./src/main.cpp
rm -f ./GetToolDAQ.sh
sed -i 's/setup=1/setup=0/' ./GetToolFramework.sh
fi
make clean
make -j $threads
export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
fi