-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup-lcg-view.sh
executable file
·63 lines (56 loc) · 1.8 KB
/
setup-lcg-view.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
#!/usr/bin/env bash
set -e
if [ -z "${VIEW_PATH}" ]; then
if [ ! -z "${LCG_RELEASE}" ] && [ ! -z "${LCG_RELEASE_PLATFORM}" ]; then
echo "You set the variable release and release-platform together, this is not possible."
echo "You either the variable pair release and platform or just release-platform."
exit 1
fi
if [ ! -z "${LCG_PLATFORM}" ] && [ ! -z "${LCG_RELEASE_PLATFORM}" ]; then
echo "You set the variable platform and release-platform together, this is not possible."
echo "You either the variable pair release and platform or just release-platform."
exit 1
fi
if [ ! -z "${LCG_PLATFORM}" ]; then
export LCG_RELEASE_PLATFORM="${LCG_RELEASE}/${LCG_PLATFORM}"
fi
export LCG_RELEASE=$(echo "${LCG_RELEASE_PLATFORM}" | cut -d '/' -f 1)
export LCG_PLATFORM=$(echo "${LCG_RELEASE_PLATFORM}" | cut -d '/' -f 2)
export SYSTEM=$(echo "${LCG_RELEASE_PLATFORM}" | cut -d '/' -f 2 | cut -d '-' -f 2)
else
if [ "${CONTAINER}" == "auto" ]; then
export SYSTEM=$(echo "${VIEW_PATH}" | awk -F'x86_64-' '{print $2}' | cut -d '-' -f 1)
else
export SYSTEM=${CONTAINER}
fi
fi
if [ "$(uname)" == "Linux" ]; then
if [[ "${SYSTEM}" == *"mac"* ]]; then
echo "You are trying to use a mac view on a linux system, this is not possible."
exit 1
fi
if [ ! -z "${COVERITY_PROJECT_TOKEN}" ]; then
if [ "$1" == "local" ]; then
. run-coverity.sh local
else
$THIS/run-coverity.sh
fi
else
if [ "$1" == "local" ]; then
. run-linux.sh
else
$THIS/run-linux.sh
fi
fi
fi
if [ "$(uname)" == "Darwin" ]; then
if [[ "${SYSTEM}" != *"mac"* ]]; then
echo "You are trying to use a non macOS view on a macOS system, this is not possible."
exit 1
fi
if [ "$1" == "local" ]; then
. run-macOS.sh
else
$THIS/run-macOS.sh
fi
fi