-
Notifications
You must be signed in to change notification settings - Fork 4
/
platform_init.sh
53 lines (46 loc) · 1.91 KB
/
platform_init.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
# =======================================================================
# 0 script platform_init.sh
# =======================================================================
# 1. platform1_reqs.sh script: ------------------------------------------
echo "Stage 1/2 -------- check requirements (platform1_reqs.sh script)"
# REQUIREMENTS_SATISFIED=0 not good)"
export REQUIREMENTS_SATISFIED=0
source ./platform1_reqs.sh
# REQUIREMENTS_SATISFIED=1 (g++ ,gcc... exist)
if [ $REQUIREMENTS_SATISFIED == '1' ]; then
echo "Requirements not satisfied"
echo "Please install missing packages to continue installation"
return;
fi
echo "Stage 1/2 Check requirements completed "
read -p "Press enter to continue installation"
echo " "
# -----------------------------------------------------------------------
# 2. platform2_set script generation: ------------------------------------
echo "Stage 2/2 -- Check plat_conf.sh script (must be generated by platform_set.sh)"
if [ -f './platform_conf.sh' ]; then
source ./platform_conf.sh
echo "script platform_conf.sh found"
else
source ./platform2_set.sh
if [ -f './platform_conf.sh' ]; then
echo "platform_conf.sh generated"
source ./platform_conf.sh
else
echo "Error: platform_conf.sh not generated!!"
return
fi
fi
echo "Stage 2/2 platform_conf.sh found and environment configured"
read -p "Press enter to continue installation"
echo " "
# -----------------------------------------------------------------------
# ========================================================================
# call install.sh to strat PLAT_BUILD ----------------------------------
echo " Build PLAT_BUILD directory: start gui"
# build directory PLAT_BUILD ---------------------------------------------
cd PLAT_BUILD
# =======================================================================
source ./buildgui.sh
# back to the numerical platform basic dir -------------------------------
cd ../