Check for pdo_mysql php module

This commit is contained in:
Starbeamrainbowlabs 2019-04-04 23:01:57 +01:00
parent 21fe2ff1dc
commit a9b6214a9e
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 11 additions and 0 deletions

11
build
View File

@ -86,6 +86,15 @@ task_download-composer() {
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() {
stage_begin "Setting up";
@ -95,6 +104,8 @@ task_setup() {
check_command node true;
check_command npm true;
check_php_module pdo_mysql;
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.";
fi