forked from degauden/Elements
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathHEADVersionProject_test
More file actions
executable file
·134 lines (92 loc) · 2.96 KB
/
Copy pathHEADVersionProject_test
File metadata and controls
executable file
·134 lines (92 loc) · 2.96 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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#!/bin/sh
home_dir=${PWD}
projectA_name="ProjectA"
projectA_version="HEAD"
projectB_name="ProjectB"
projectB_version="1.2"
# Create unique directory
tmploc=$(mktemp -dq -t temp.XXXXXX)
# Clean and exit
local_clean_exit() {
cd ${home_dir}
rm -rf ${tmploc}
exit $1
}
echo "ELEMENTS_PROJECT_ROOT: ${ELEMENTS_PROJECT_ROOT}"
extra_proj_path=
if [ "$(basename ${ELEMENTS_PROJECT_ROOT})" = "Elements" ]; then
par_dir=$(dirname ${ELEMENTS_PROJECT_ROOT})
extra_proj_path=${par_dir}
else
par_dir=$(dirname ${ELEMENTS_PROJECT_ROOT})
if [ "$(basename ${par_dir})" = "Elements" ]; then
extra_proj_path=$(dirname ${par_dir})
fi
fi
echo "Internal CMAKE_PROJECT_PATH: ${extra_proj_path}"
if [ -z "${extra_proj_path}" ]; then
echo "The internal CMAKE_POJECT_PATH is empty"
local_clean_exit 0
fi
# Set to the User_area
export User_area=${tmploc}
export CMAKE_PROJECT_PATH=${User_area}:${extra_proj_path}:${CMAKE_PROJECT_PATH}
echo "CMAKE_PROJECT_PATH: ${CMAKE_PROJECT_PATH}"
echo "BINARY_TAG: ${BINARY_TAG}"
echo "User_area ${User_area}"
echo "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}"
# check that the Elements framework has been installed. It is
# not enough to have it built
if [ -e ${ELEMENTS_PROJECT_ROOT}/InstallArea/${BINARY_TAG}/manifest.xml ]; then
cd ${User_area} || local_clean_exit 1
CreateElementsProject $projectA_name $projectA_version --yes
# Error? stop and clean up
if [ $? -ne 0 ]; then
echo "Error: <CreateElementsProject $projectA_name $projectA_version> command failed!" 1>&2
local_clean_exit 1
fi
cd $projectA_name/$projectA_version || local_clean_exit 1
#AddElementsModule $projectA_name
make configure
if [ $? -ne 0 ]; then
echo "Error: <Configuration of $projectA_name $projectA_version> failed!" 1>&2
local_clean_exit 1
fi
make
if [ $? -ne 0 ]; then
echo "Error: <Builld of $projectA_name $projectA_version> failed!" 1>&2
local_clean_exit 1
fi
make install
if [ $? -ne 0 ]; then
echo "Error: <Installation of $projectA_name $projectA_version> failed!" 1>&2
local_clean_exit 1
fi
if [ ! -e InstallArea/${BINARY_TAG}/manifest.xml ]; then
echo "Error: <Installation of $projectA_name $projectA_version> failed!" 1>&2
local_clean_exit 1
fi
cd ${User_area} || local_clean_exit 1
CreateElementsProject -d $projectA_name $projectA_version $projectB_name $projectB_version --yes
cd $projectB_name/$projectB_version
#AddElementsModule $projectB_name
make configure
if [ $? -ne 0 ]; then
echo "Error: <Configuration of $projectB_name $projectB_version> failed!" 1>&2
local_clean_exit 1
fi
make
if [ $? -ne 0 ]; then
echo "Error: <Builld of $projectB_name $projectB_version> failed!" 1>&2
local_clean_exit 1
fi
make install
if [ $? -ne 0 ]; then
echo "Error: <Installation of $projectB_name $projectB_version> failed!" 1>&2
local_clean_exit 1
fi
else
echo "Warning: The Elements framework is not available in its InstallArea ${ELEMENTS_PROJECT_ROOT}/InstallArea/${BINARY_TAG}" 1>&2
local_clean_exit 0
fi
local_clean_exit 0