-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall
42 lines (34 loc) · 1 KB
/
install
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
#!/bin/sh
# v1.0.0
BOLD=`tput bold`
GREY=`tput setaf 8`
NORMAL=`tput sgr0`
RED=`tput setaf 9`
UNDERLINE=`tput smul`
WHITE=`tput setaf 15`
# Check that composer is installed
if ! which composer > /dev/null; then
ERRORS=("${ERRORS[@]}" "==>${WHITE} composer ${GREY}${UNDERLINE}https://getcomposer.org/${NORMAL}")
fi
# Check that mysql is installed
if ! which mysql > /dev/null; then
ERRORS=("${ERRORS[@]}" "==>${WHITE} mysql ${GREY}${UNDERLINE}https://dev.mysql.com/downloads/mysql/${NORMAL}")
fi
# Check that perl is installed
if ! which perl > /dev/null; then
ERRORS=("${ERRORS[@]}" "==>${WHITE} perl ${GREY}${UNDERLINE}https://www.perl.org/get.html${NORMAL}")
fi
if [ ${#ERRORS[@]} -gt 0 ]; then
echo "${RED}${BOLD}Error: ${NORMAL}The following commands were not found:"
for error in "${ERRORS[@]}"
do
echo $"${error}"
done
exit 1
fi
composer install
sh ./scripts/install-wordpress.sh
sh ./scripts/install-castor.sh
sh ./scripts/cleanup.sh
rm -rf ./scripts
rm ./install