-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·72 lines (52 loc) · 1.38 KB
/
setup.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
#!/bin/bash
OPENSRC_DIR=/QOpenSys/pkgs/bin
################################################################################
#
# Procedures.
#
################################################################################
# exist_directory dest
#
# dest is an directory to check
#
# exit 1 (succeeds) directort exist, else 0.
exist_directory()
{
[ -d "${1}" ] && return 0 || return 1
}
#
# install_yum_dependencies
#
install_yum_dependencies()
{
yum -y install 'make-gnu' 'maven' 'jq'
}
#
# build_project
#
build_project()
{
git pull
cd ./IWSBuilder
mvn clean verify assembly:single
gmake
cd ..
}
################################################################################
#
# Main
#
################################################################################
if exist_directory "${OPENSRC_DIR}"; then
echo "5733-OPS product is installed ..."
else
echo -e "\e[31m Please install 5733-OPS product first.\e[0m"
fi
# set path to OpenSource
echo -e "\e[32m setting path to OpenSource ...\e[0m"
export PATH=${OPENSRC_DIR}:$PATH
echo -e "\e[32m installing dependencies for si-iws-builder ...\e[0m"
echo -e "\e[32m installing yum dependencies ...\e[0m"
install_yum_dependencies
echo -e "\e[32m build si-iws-builder ...\e[0m"
build_project