-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·39 lines (34 loc) · 1.14 KB
/
install.sh
File metadata and controls
executable file
·39 lines (34 loc) · 1.14 KB
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
#!/bin/bash
GREEN="\e[32m"
YELLOW="\e[33m"
RED="\e[31m"
ENDCOLOR="\e[0m"
RM=rm
GIT_COMMAND=git
PYTHON3_COMMAND=python3
VALGRIND_COMMAND=valgrind
## Check required commands
if ! command -v $GIT_COMMAND 2>&1 >/dev/null
then
echo -e "${YELLOW}${GIT_COMMAND}${RED} could not be found!${ENDCOLOR}\nPlease install the ${YELLOW}${GIT_COMMAND}${ENDCOLOR} package."
exit 1
fi
if ! command -v $PYTHON3_COMMAND 2>&1 >/dev/null
then
echo -e "${YELLOW}${PYTHON3_COMMAND}${RED} could not be found!${ENDCOLOR}\nPlease install the ${YELLOW}${PYTHON3_COMMAND}${ENDCOLOR} package."
exit 1
fi
if ! command -v $VALGRIND_COMMAND 2>&1 >/dev/null
then
echo -e "${YELLOW}${VALGRIND_COMMAND}${RED} could not be found!${ENDCOLOR}\nPlease install the ${YELLOW}${VALGRIND_COMMAND}${ENDCOLOR} package."
exit 1
fi
$RM -rf /tmp/grindme-installer
if ! git clone --depth=1 https://github.com/liam-colle/GrindMe.git /tmp/grindme-installer 2> /dev/null; then
echo -e "${RED}${GIT_COMMAND} could not clone the repository.\n${YELLOW}Check your connection to github.${ENDCOLOR}"
exit 1
fi
cd /tmp/grindme-installer
./install_system.sh
cd -
$RM -rf /tmp/grindme-installer