forked from sandialabs/scot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·55 lines (41 loc) · 1016 Bytes
/
install.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
#!/bin/bash
#
# SCOT 3 installer
#
# goal: support more than Ubuntu
#
#
echo "########## "
echo "########## SCOT3 installer"
echo "########## support at: [email protected]"
echo "########## "
echo ""
echo "Determining OS..."
echo ""
DISTRO=`./etc/determine_os.sh | cut -d ' ' -f 2`
echo "Looks like a $DISTRO based system"
if [[ $DISTRO == "RedHat" ]]; then
if ! hash lsb_release 2>/dev/null; then
# ubuntu should have this, but surprisingly
# redhat/centos/fedora? might not have this installed!
yum install redhat-lsb
fi
fi
OS=`lsb_release -i | cut -s -f 2`
OSVERSION=`lsb_release -r | cut -s -f2 | cut -d. -f 1`
echo "LSB results = $OS : $OSVERSION"
if [[ "$OS" == "CentOS" ]]; then
echo "CentOS detected..."
./centos_installer.sh
exit 0
fi
if [[ "$OS" == "Ubuntu" ]]; then
./ubuntu_installer.sh
exit 0
fi
if [[ "$OS" == *"RedHat"* ]]; then
./redhat_installer.sh
exit 0
fi
echo "!!!! Installation not support for this OS !!!!"
exit 1;