-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate.sh
executable file
·75 lines (68 loc) · 1.48 KB
/
update.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
72
73
74
75
#!/usr/bin/bash
echo "Bilobe Installer Script..."
checkPKGM()
{
[ -x "$(which $1)" ]
}
function bilobeAPT() {
clear
echo "Starting Bilobe Installation Bilobe"
echo "Checking essentials required"
sudo apt-get install cmake build-essential
}
function bilobePAC()
{
clear
echo "Starting Bilobe Installation Bilobe"
echo "Checking essentials required"
sudo pacman -Sy base-devel make cmake
}
function bilobeYum()
{
clear
echo "Starting Bilobe Installation Bilobe"
echo "Checking essentials required"
sudo yum groupinstall "Development Tools"
sudo yum install cmake
}
function bilobeDnf()
{
clear
echo "Starting Bilobe Installation Bilobe"
echo "Checking essentials required"
sudo dnf install cmake gcc-c++ make
}
function buildBilobe() {
echo "Pulling the latest version of Bilobe from its repo"
git pull --rebase
echo "Removing the old build of Bilobe"
rm -rf build
echo "Making directory build..."
mkdir build
echo "Changing directory..."
cd build
echo "Rebuilding Bilobe project..."
cmake ..
echo "Rebuilt bilobe..."
sudo make install
echo "Successfully updated Bilobe..."
}
if checkPKGM apt-get
then
bilobeAPT
buildBilobe
elif checkPKGM pacman
then
bilobePAC
buildBilobe
elif checkPKGM dnf
then
bilobeDnf
buildBilobe
elif checkPKGM yum
then
bilobeYum
buildBilobe
else
echo "Please install the Requirements manually and build the project once again"
fi