-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from ikari7789/patch-1
Update for new PHP packages from Homebrew
- Loading branch information
Showing
5 changed files
with
31 additions
and
37 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
for version in 53 54 55 56 70 71 72; | ||
for version in '5.6' '7.0' '7.1' '7.2'; | ||
do | ||
brew unlink php$version; | ||
brew unlink php@$version; | ||
done |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,23 +2,16 @@ | |
|
||
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then | ||
brew tap homebrew/dupes | ||
brew tap homebrew/versions | ||
brew tap homebrew/homebrew-php | ||
brew update | ||
brew install php53 | ||
brew unlink php53 | ||
brew install php54 | ||
brew unlink php54 | ||
brew install php55 | ||
brew unlink php55 | ||
brew install php56 | ||
brew unlink php56 | ||
brew install php70 | ||
brew unlink php70 | ||
brew install php71 | ||
brew unlink php71 | ||
brew install php72 | ||
brew unlink php72 | ||
brew install [email protected] | ||
brew unlink [email protected] | ||
brew install [email protected] | ||
brew unlink [email protected] | ||
brew install [email protected] | ||
brew unlink [email protected] | ||
brew install [email protected] | ||
brew link --overwrite [email protected] | ||
brew unlink [email protected] | ||
|
||
echo 'Installed all PHP versions.' | ||
fi |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,11 @@ | |
# Twitter: @p_cook | ||
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g') | ||
|
||
brew_array=("53","54","55","56","70","71","72") | ||
php_array=("php53" "php54" "php55" "php56" "php70" "php71" "php72") | ||
valet_support_php_version_array=("php56" "php70" "php71" "php72") | ||
brew_array=("5.6","7.0","7.1","7.2") | ||
php_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]") | ||
valet_support_php_version_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]") | ||
php_installed_array=() | ||
php_version="php$1" | ||
php_version="php@$1" | ||
php_opt_path="$brew_prefix\/opt\/" | ||
|
||
php5_module="php5_module" | ||
|
@@ -31,7 +31,7 @@ then | |
exit | ||
fi | ||
|
||
if [ $(echo "$php_version" | sed 's/^php//') -ge 70 ]; then | ||
if [ $(echo "$php_version" | sed 's/^php@//' | sed 's/\.//') -ge 70 ]; then | ||
php_module="$php7_module" | ||
apache_php_lib_path="$apache_php7_lib_path" | ||
fi | ||
|
@@ -110,7 +110,7 @@ then | |
brew unlink $i | ||
fi | ||
done | ||
brew link "$php_version" | ||
brew link --force "$php_version" | ||
|
||
# Switch apache | ||
if [[ $apache_change -eq 1 ]]; then | ||
|
@@ -121,7 +121,7 @@ then | |
do | ||
loop_php_module="$php5_module" | ||
loop_apache_php_lib_path="$apache_php5_lib_path" | ||
if [ $(echo "$j" | sed 's/^php//') -ge 70 ]; then | ||
if [ $(echo "$j" | sed 's/^php@//' | sed 's/\.//') -ge 70 ]; then | ||
loop_php_module="$php7_module" | ||
loop_apache_php_lib_path="$apache_php7_lib_path" | ||
fi | ||
|
@@ -163,3 +163,4 @@ $comment_apache_module_string\\ | |
else | ||
echo "Unknown version of PHP. PHP Switcher can only handle arguments of:" ${brew_array[@]} | ||
fi | ||
|