-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
54 lines (45 loc) · 1.26 KB
/
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
# Erase previous build folder
sudo rm -r build
# Set shell to exit in the first error
set -e
# Init and update submodules
git submodule init && git submodule update
# Setup github hooks
sudo cp test/hook/pre-commit .git/hooks/
sudo chmod +x .git/hooks/pre-commit
# Create build folder, generate MakeFile and install Armorial library
mkdir build && cd build
qmake install_path=/usr/lib ..
sudo make install
cd ..
# Clean old headers
if [ -d /usr/include/Armorial ];
then
if [ -w /usr/include/Armorial ];
then
rm -rf /usr/include/Armorial
else
echo ""
echo ">> Armorial: Error in library headers installation! (Are you root?)"
exit 1
fi
fi
# Copies Armorial library headers to /usr/include
if [ -w /usr/include ];
then
mkdir /usr/include/Armorial
else
echo ""
echo ">> Armorial: Error in library headers installation! (Are you root?)"
exit 1
fi
if [ -d /usr/include/Armorial ];
then
cp -rf include/Armorial/* /usr/include/Armorial
echo ""
echo ">> Armorial: Installation complete!"
else
echo ""
echo ">> Armorial: Error in library headers installation! (Are you root?)"
exit 1
fi