Created
March 23, 2020 22:26
-
-
Save dorian-e3/218da6cceef4c39e9dac6b9a176b9977 to your computer and use it in GitHub Desktop.
Install Php extension in drupalvm post provision script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get --assume-yes install libzip-dev | |
echo 'installed libzip' | |
sudo pecl install zip | |
echo 'installed zip php extension' | |
# add installed zip php pecl package to ini, if not enabled. | |
if php --info | grep -q 'zip'; then | |
echo 'extension=zip.so' | sudo tee /etc/php/7.2/cli/conf.d/zip.ini | |
echo 'zip extension added to php config' | |
else | |
echo 'zip already installed, doing nothing' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment