mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-11-22 06:23:01 +00:00
Check for pdo_mysql php module
This commit is contained in:
parent
21fe2ff1dc
commit
a9b6214a9e
1 changed files with 11 additions and 0 deletions
11
build
11
build
|
@ -86,6 +86,15 @@ task_download-composer() {
|
||||||
task_end ${exit_code};
|
task_end ${exit_code};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_php_module() {
|
||||||
|
module_name="$1";
|
||||||
|
subtask_begin "Checking for ${module_name} PHP module";
|
||||||
|
if [[ "$(php -m | grep -i pdo_mysql | wc -l)" -eq "0" ]]; then
|
||||||
|
subtask_end 1 "Error: The php_mysql PHP module is not installed.";
|
||||||
|
fi
|
||||||
|
subtask_end 0;
|
||||||
|
}
|
||||||
|
|
||||||
task_setup() {
|
task_setup() {
|
||||||
stage_begin "Setting up";
|
stage_begin "Setting up";
|
||||||
|
|
||||||
|
@ -95,6 +104,8 @@ task_setup() {
|
||||||
check_command node true;
|
check_command node true;
|
||||||
check_command npm true;
|
check_command npm true;
|
||||||
|
|
||||||
|
check_php_module pdo_mysql;
|
||||||
|
|
||||||
if [ ! -w "${PWD}" ]; then
|
if [ ! -w "${PWD}" ]; then
|
||||||
task_end 1 "${HC}${FRED}Error: Can't write to the repository directory! This usually you have a permission error of some kind. Try using sudo to run this build command as the user that owns this cloned repository.";
|
task_end 1 "${HC}${FRED}Error: Can't write to the repository directory! This usually you have a permission error of some kind. Try using sudo to run this build command as the user that owns this cloned repository.";
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue