-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall-all.sh
More file actions
executable file
·68 lines (59 loc) · 2.03 KB
/
install-all.sh
File metadata and controls
executable file
·68 lines (59 loc) · 2.03 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
#!/bin/bash
##########################################
# install & generate both GCC 7 & 8 RPM
# for both non-PGO + PGO builds
##########################################
DT=$(date +"%d%m%y-%H%M%S")
DIR_TMP='/svr-setup'
CENTMINLOGDIR='/root/centminlogs'
GCC_PGO='y'
GCC_SEVENONLY='n'
GCC_EIGHTONLY='n'
build() {
if [[ -f install.sh ]]; then
if [[ "$GCC_SEVENONLY" = [yY] || "$GCC_EIGHTONLY" != [yY] ]]; then
echo
echo "----------------------------------------------------------------"
echo "./install.sh binutils7"
./install.sh binutils7
echo
echo "----------------------------------------------------------------"
echo "./install.sh installgcc7"
./install.sh installgcc7
if [[ "$GCC_PGO" = [yY] ]]; then
echo
echo "----------------------------------------------------------------"
echo "./install.sh installpgogcc7"
./install.sh installpgogcc7
fi
fi
if [[ "$GCC_EIGHTONLY" = [yY] || "$GCC_SEVENONLY" != [yY] ]]; then
echo
echo "----------------------------------------------------------------"
echo "./install.sh binutils8"
./install.sh binutils8
echo
echo "----------------------------------------------------------------"
echo "./install.sh installgcc8"
./install.sh installgcc8
if [[ "$GCC_PGO" = [yY] ]]; then
echo
echo "----------------------------------------------------------------"
echo "./install.sh installpgogcc8"
./install.sh installpgogcc8
fi
fi
fi
echo "ls -lah $DIR_TMP | egrep 'gcc[7,8]|binutils-gcc' | grep rpm"
ls -lah "$DIR_TMP" | egrep 'gcc[7,8]|binutils-gcc' | grep rpm
}
starttime=$(TZ=UTC date +%s.%N)
{
build
} 2>&1 | tee "${CENTMINLOGDIR}/tools-gcc-install-all_${DT}.log"
endtime=$(TZ=UTC date +%s.%N)
INSTALLTIME=$(echo "scale=2;$endtime - $starttime"|bc )
echo "" >> "${CENTMINLOGDIR}/tools-gcc-install-all_${DT}.log"
echo "Total Run Time: $INSTALLTIME seconds" >> "${CENTMINLOGDIR}/tools-gcc-install-all_${DT}.log"
tail -2 "${CENTMINLOGDIR}/tools-gcc-install-all_${DT}.log"
exit