-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·48 lines (39 loc) · 1.2 KB
/
configure
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 for Bash
if ! command -v bash >/dev/null 2>&1; then
echo "Error: Bash is not installed."
exit 1
fi
# Check for curl
if ! command -v curl >/dev/null 2>&1; then
echo "Error: curl is not installed."
exit 1
fi
# Check for git
if ! command -v git >/dev/null 2>&1; then
echo "Error: git is not installed."
exit 1
fi
# Check for make
if ! command -v make >/dev/null 2>&1; then
echo "Error: make is not installed."
exit 1
fi
# Check for pacman (to ensure Arch-based system)
if ! command -v pacman >/dev/null 2>&1; then
echo "Error: pacman is not installed. This script is intended for use on Arch-based systems only."
exit 1
fi
# Check for Python
if ! command -v python >/dev/null 2>&1; then
echo "Error: Python is not installed."
pacman -S python
fi
# Check that the Python version is at least 3.6
python_version=$(python -c "import platform; print(platform.python_version())")
if ! python -c "import sys; exit(not (sys.version_info.major == 3 and sys.version_info.minor >= 6))"; then
echo "Error: Python version 3.6 or higher is required (found version $python_version)."
exit 1
fi
echo "Configuration complete. Your system has all necessary dependencies installed."
exit 0