Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 718afef

Browse files
author
Antonios Papadakis
committed
Add Colors to the startLAMP and startPHP scripts
macOS
1 parent 636a813 commit 718afef

File tree

8 files changed

+56
-24
lines changed

8 files changed

+56
-24
lines changed

macos/Docker/dockerFiles/mysql-8.0/php-latest-7.2/startLAMP.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
#!/bin/bash
22

3+
NC='\033[0m' # No Color
4+
YELLOW='\033[1;33m'
5+
RED='\033[1;31m'
6+
37
function SQLSetup() {
48
read -p 'Where would you like your MySQL server files to reside on your local machine (absolute path, must exist)? ' MYSQLFOLDERLOCATION
59
ls "$MYSQLFOLDERLOCATION"
610
ISMYSQLFOLDERPRESENT=$?
711
if [ -z "$MYSQLFOLDERLOCATION" ]; then
8-
echo The path of the MySQL file folder cannot be empty. Please choose a folder.
12+
echo -e "${YELLOW}The path of the MySQL file folder cannot be empty. Please choose a folder.${NC}"
913
SQLSetup
1014
elif [ "$ISMYSQLFOLDERPRESENT" = 1 ]; then
11-
echo "$MYSQLFOLDERLOCATION" does not exist, please choose another folder.
15+
echo -e "$MYSQLFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
1216
SQLSetup
1317
fi
1418
}
@@ -17,10 +21,10 @@ function PHPSetup() {
1721
ls "$APACHEFOLDERLOCATION"
1822
ISAPACHEFOLDERPRESENT=$?
1923
if [ -z "$APACHEFOLDERLOCATION" ]; then
20-
echo The path of the PHP website files folder cannot be empty. Please choose a folder.
24+
echo -e "${YELLOW}The path of the PHP website files folder cannot be empty. Please choose a folder.${NC}"
2125
PHPSetup
2226
elif [ "$ISAPACHEFOLDERPRESENT" = 1 ]; then
23-
echo "$APACHEFOLDERLOCATION" does not exist, please choose another folder.
27+
echo -e "$APACHEFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
2428
PHPSetup
2529
fi
2630
}

macos/Docker/dockerFiles/mysql-8.0/php-latest-7.2/startPHP.sh

100644100755
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
#!/bin/bash
22

3+
NC='\033[0m' # No Color
4+
YELLOW='\033[1;33m'
5+
RED='\033[1;31m'
6+
37
function PHPSetup() {
48
read -p 'Where would you like your PHP website files to reside on your local machine (absolute path, must exist)? ' APACHEFOLDERLOCATION
59
ls "$APACHEFOLDERLOCATION"
610
ISAPACHEFOLDERPRESENT=$?
711
if [ "$APACHEFOLDERLOCATION" = : ]; then
8-
echo The path of the PHP website files folder cannot be empty. Please choose a folder.
12+
echo -e "${YELLOW}The path of the PHP website files folder cannot be empty. Please choose a folder.${NC}"
913
PHPSetup
1014
elif [ "$ISAPACHEFOLDERPRESENT" = 1 ]; then
11-
echo "$APACHEFOLDERLOCATION" does not exist, please choose another folder.
15+
echo -e "$APACHEFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
1216
PHPSetup
1317
fi
1418
}

macos/Docker/dockerFiles/mysql-8.0/php-latest-7.3/startLAMP.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
#!/bin/bash
22

3+
NC='\033[0m' # No Color
4+
YELLOW='\033[1;33m'
5+
RED='\033[1;31m'
6+
37
function SQLSetup() {
48
read -p 'Where would you like your MySQL server files to reside on your local machine (absolute path, must exist)? ' MYSQLFOLDERLOCATION
59
ls "$MYSQLFOLDERLOCATION"
610
ISMYSQLFOLDERPRESENT=$?
711
if [ -z "$MYSQLFOLDERLOCATION" ]; then
8-
echo The path of the MySQL file folder cannot be empty. Please choose a folder.
12+
echo -e "${YELLOW}The path of the MySQL file folder cannot be empty. Please choose a folder.${NC}"
913
SQLSetup
1014
elif [ "$ISMYSQLFOLDERPRESENT" = 1 ]; then
11-
echo "$MYSQLFOLDERLOCATION" does not exist, please choose another folder.
15+
echo -e "$MYSQLFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
1216
SQLSetup
1317
fi
1418
}
@@ -17,10 +21,10 @@ function PHPSetup() {
1721
ls "$APACHEFOLDERLOCATION"
1822
ISAPACHEFOLDERPRESENT=$?
1923
if [ -z "$APACHEFOLDERLOCATION" ]; then
20-
echo The path of the PHP website files folder cannot be empty. Please choose a folder.
24+
echo -e "${YELLOW}The path of the PHP website files folder cannot be empty. Please choose a folder.${NC}"
2125
PHPSetup
2226
elif [ "$ISAPACHEFOLDERPRESENT" = 1 ]; then
23-
echo "$APACHEFOLDERLOCATION" does not exist, please choose another folder.
27+
echo -e "$APACHEFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
2428
PHPSetup
2529
fi
2630
}

macos/Docker/dockerFiles/mysql-8.0/php-latest-7.3/startPHP.sh

100644100755
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
#!/bin/bash
22

3+
NC='\033[0m' # No Color
4+
YELLOW='\033[1;33m'
5+
RED='\033[1;31m'
6+
37
function PHPSetup() {
48
read -p 'Where would you like your PHP website files to reside on your local machine (absolute path, must exist)? ' APACHEFOLDERLOCATION
59
ls "$APACHEFOLDERLOCATION"
610
ISAPACHEFOLDERPRESENT=$?
711
if [ -z "$APACHEFOLDERLOCATION" ]; then
8-
echo The path of the PHP website files folder cannot be empty. Please choose a folder.
12+
echo -e "${YELLOW}The path of the PHP website files folder cannot be empty. Please choose a folder.${NC}"
913
PHPSetup
1014
elif [ "$ISAPACHEFOLDERPRESENT" = 1 ]; then
11-
echo "$APACHEFOLDERLOCATION" does not exist, please choose another folder.
15+
echo -e "$APACHEFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
1216
PHPSetup
1317
fi
1418
}

macos/Docker/dockerFiles/mysql-8.0/php-latest-7.4/startLAMP.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
#!/bin/bash
22

3+
NC='\033[0m' # No Color
4+
YELLOW='\033[1;33m'
5+
RED='\033[1;31m'
6+
37
function SQLSetup() {
48
read -p 'Where would you like your MySQL server files to reside on your local machine (absolute path, must exist)? ' MYSQLFOLDERLOCATION
59
ls "$MYSQLFOLDERLOCATION"
610
ISMYSQLFOLDERPRESENT=$?
711
if [ -z "$MYSQLFOLDERLOCATION" ]; then
8-
echo The path of the MySQL file folder cannot be empty. Please choose a folder.
12+
echo -e "${YELLOW}The path of the MySQL file folder cannot be empty. Please choose a folder.${NC}"
913
SQLSetup
1014
elif [ "$ISMYSQLFOLDERPRESENT" = 1 ]; then
11-
echo "$MYSQLFOLDERLOCATION" does not exist, please choose another folder.
15+
echo -e "$MYSQLFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
1216
SQLSetup
1317
fi
1418
}
@@ -17,10 +21,10 @@ function PHPSetup() {
1721
ls "$APACHEFOLDERLOCATION"
1822
ISAPACHEFOLDERPRESENT=$?
1923
if [ -z "$APACHEFOLDERLOCATION" ]; then
20-
echo The path of the PHP website files folder cannot be empty. Please choose a folder.
24+
echo -e "${YELLOW}The path of the PHP website files folder cannot be empty. Please choose a folder.${NC}"
2125
PHPSetup
2226
elif [ "$ISAPACHEFOLDERPRESENT" = 1 ]; then
23-
echo "$APACHEFOLDERLOCATION" does not exist, please choose another folder.
27+
echo -e "$APACHEFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
2428
PHPSetup
2529
fi
2630
}

macos/Docker/dockerFiles/mysql-8.0/php-latest-7.4/startPHP.sh

100644100755
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
#!/bin/bash
22

3+
NC='\033[0m' # No Color
4+
YELLOW='\033[1;33m'
5+
RED='\033[1;31m'
6+
37
function PHPSetup() {
48
read -p 'Where would you like your PHP website files to reside on your local machine (absolute path, must exist)? ' APACHEFOLDERLOCATION
59
ls "$APACHEFOLDERLOCATION"
610
ISAPACHEFOLDERPRESENT=$?
711
if [ -z "$APACHEFOLDERLOCATION" ]; then
8-
echo The path of the PHP website files folder cannot be empty. Please choose a folder.
12+
echo -e "${YELLOW}The path of the PHP website files folder cannot be empty. Please choose a folder.${NC}"
913
PHPSetup
1014
elif [ "$ISAPACHEFOLDERPRESENT" = 1 ]; then
11-
echo "$APACHEFOLDERLOCATION" does not exist, please choose another folder.
15+
echo -e "$APACHEFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
1216
PHPSetup
1317
fi
1418
}

macos/Docker/dockerFiles/mysql-8.0/php-latest-8.0/startLAMP.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
#!/bin/bash
22

3+
NC='\033[0m' # No Color
4+
YELLOW='\033[1;33m'
5+
RED='\033[1;31m'
6+
37
function SQLSetup() {
48
read -p 'Where would you like your MySQL server files to reside on your local machine (absolute path, must exist)? ' MYSQLFOLDERLOCATION
59
ls "$MYSQLFOLDERLOCATION"
610
ISMYSQLFOLDERPRESENT=$?
711
if [ -z "$MYSQLFOLDERLOCATION" ]; then
8-
echo The path of the MySQL file folder cannot be empty. Please choose a folder.
12+
echo -e "${YELLOW}The path of the MySQL file folder cannot be empty. Please choose a folder.${NC}"
913
SQLSetup
1014
elif [ "$ISMYSQLFOLDERPRESENT" = 1 ]; then
11-
echo "$MYSQLFOLDERLOCATION" does not exist, please choose another folder.
15+
echo -e "$MYSQLFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
1216
SQLSetup
1317
fi
1418
}
@@ -17,10 +21,10 @@ function PHPSetup() {
1721
ls "$APACHEFOLDERLOCATION"
1822
ISAPACHEFOLDERPRESENT=$?
1923
if [ -z "$APACHEFOLDERLOCATION" ]; then
20-
echo The path of the PHP website files folder cannot be empty. Please choose a folder.
24+
echo -e "${YELLOW}The path of the PHP website files folder cannot be empty. Please choose a folder.${NC}"
2125
PHPSetup
2226
elif [ "$ISAPACHEFOLDERPRESENT" = 1 ]; then
23-
echo "$APACHEFOLDERLOCATION" does not exist, please choose another folder.
27+
echo -e "$APACHEFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
2428
PHPSetup
2529
fi
2630
}

macos/Docker/dockerFiles/mysql-8.0/php-latest-8.0/startPHP.sh

100644100755
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
#!/bin/bash
22

3+
NC='\033[0m' # No Color
4+
YELLOW='\033[1;33m'
5+
RED='\033[1;31m'
6+
37
function PHPSetup() {
48
read -p 'Where would you like your PHP website files to reside on your local machine (absolute path, must exist)? ' APACHEFOLDERLOCATION
59
ls "$APACHEFOLDERLOCATION"
610
ISAPACHEFOLDERPRESENT=$?
711
if [ -z "$APACHEFOLDERLOCATION" ]; then
8-
echo The path of the PHP website files folder cannot be empty. Please choose a folder.
12+
echo -e "${YELLOW}The path of the PHP website files folder cannot be empty. Please choose a folder.${NC}"
913
PHPSetup
1014
if [ "$ISAPACHEFOLDERPRESENT" = 1 ]; then
11-
echo "$APACHEFOLDERLOCATION" does not exist, please choose another folder.
15+
echo -e "$APACHEFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
1216
PHPSetup
1317
fi
1418
}

0 commit comments

Comments
 (0)