Check for pdo_mysql php module

pull/35/head
Starbeamrainbowlabs 4 years ago
parent 21fe2ff1dc
commit a9b6214a9e
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 11
      build

11
build

@ -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

Loading…
Cancel
Save