Optimize installation scripts

This commit is contained in:
Shivam Mathur
2019-09-21 21:36:03 +05:30
parent 585f7a1fd2
commit 9cfe4e665e
3208 changed files with 83 additions and 198512 deletions

View File

@ -52,7 +52,7 @@ function enableExtensionWindows(extension) {
$exist = Test-Path -Path $ext_dir\\php_${extension}.dll
$enabled = php -r "if (in_array('${extension}', get_loaded_extensions())) {echo 'yes';} else {echo 'no';}"
if($enabled -eq 'no' -and $exist) {
Enable-PhpExtension ${extension} C:\\tools\\php$version
Enable-PhpExtension ${extension} C:\\tools\\php
$${extension}_found = 1
}
} catch [Exception] {
@ -208,7 +208,7 @@ function addINIValuesWindows(ini_values_csv) {
return __awaiter(this, void 0, void 0, function* () {
// add script to set ini value
script +=
'Add-Content C:\\tools\\php$version\\php.ini "' + ini_value + '"\n';
'Add-Content C:\\tools\\php\\php.ini "' + ini_value + '"\n';
});
});
return script;