This file contains 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 | |
# Function to check if the PHP version is valid | |
checkPHPVersion() { | |
# The current PHP Version of the machine | |
PHPVersion=$(php -v|grep --only-matching --perl-regexp "5\.\\d+\.\\d+"); | |
# Truncate the string abit so we can do a binary comparison | |
currentVersion=${PHPVersion::0-2}; | |
# The version to validate against | |
minimumRequiredVersion=$1; |