Created
March 7, 2019 08:08
-
-
Save Romain-P/ab5f68b24e4f7040c0c378c469517c1f to your computer and use it in GitHub Desktop.
Cmake php-cgi install on UNIX
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
if (UNIX) | |
execute_process( | |
COMMAND bash "-c" "bash ${CMAKE_SOURCE_DIR}/sources/modules/php/dist/php-cgi/linux/install.sh" | |
RESULT_VARIABLE | |
RET | |
) | |
if(RET EQUAL "1") | |
message(FATAL_ERROR "Error while installing php-cgi, please install it manually") | |
endif() | |
endif(UNIX) |
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
#!/usr/bin/env bash | |
if [ -n "$(command -v php-cgi --version)" ]; then | |
exit 0 | |
elif [ -n "$(command -v yum)" ]; then | |
sudo yum install php-cgi | |
elif [ -n "$(command -v apt-get)" ]; then | |
sudo apt-get install php-cgi | |
else | |
echo -e "no package installer found on your distribution" | |
exit 1 | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment