-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sh
executable file
·47 lines (39 loc) · 1.21 KB
/
build.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
#!/bin/bash
# Check if git command exists and is executable
if ! command -v git &> /dev/null || ! [[ -x "$(command -v git)" ]]; then
echo "Git is either not installed or not executable. Please install Git properly."
exit 1
fi
# Check if cmake command exists and is executable
if ! command -v cmake &> /dev/null || ! [[ -x "$(command -v cmake)" ]]; then
echo "CMake is either not installed or not executable. Please install CMake properly."
exit 1
fi
# Run git submodule update
git submodule update --init --recursive
if [[ $? -ne 0 ]]; then
echo "Git submodule update failed. Please check your Git configuration and try again."
exit 1
fi
# Create build directory and move into it
mkdir build
cd build || exit
# Run CMake
cmake ..
if [[ $? -ne 0 ]]; then
echo "CMake configuration failed. Please check your CMake setup and try again."
exit 1
fi
# Run make
make -j
if [[ $? -ne 0 ]]; then
echo "Make failed. Please check your build configuration and try again."
exit 1
fi
# Run make install
make install
if [[ $? -ne 0 ]]; then
echo "Make install failed. Please check your installation configuration and try again."
exit 1
fi
echo "Dali has been built and installed successfully."