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

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