Skip to content

Commit

Permalink
✨ Use update-alternatives instead of symlinks for php version managem…
Browse files Browse the repository at this point in the history
…ent on cli (#684)
  • Loading branch information
svpernova09 authored Oct 8, 2017
1 parent b1cffa7 commit b70cf6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions resources/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,15 @@ function dusk() {
}

function php56() {
sudo rm /usr/bin/php
sudo ln -s /usr/bin/php5.6 /usr/bin/php
sudo update-alternatives --set php /usr/bin/php5.6
}

function php70() {
sudo rm /usr/bin/php
sudo ln -s /usr/bin/php7.0 /usr/bin/php
sudo update-alternatives --set php /usr/bin/php7.0
}

function php71() {
sudo rm /usr/bin/php
sudo ln -s /usr/bin/php7.1 /usr/bin/php
sudo update-alternatives --set php /usr/bin/php7.1
}

function serve-apache() {
Expand Down
9 changes: 3 additions & 6 deletions resources/localized/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,15 @@ function dusk() {
}

function php56() {
sudo rm /usr/bin/php
sudo ln -s /usr/bin/php5.6 /usr/bin/php
sudo update-alternatives --set php /usr/bin/php5.6
}

function php70() {
sudo rm /usr/bin/php
sudo ln -s /usr/bin/php7.0 /usr/bin/php
sudo update-alternatives --set php /usr/bin/php7.0
}

function php71() {
sudo rm /usr/bin/php
sudo ln -s /usr/bin/php7.1 /usr/bin/php
sudo update-alternatives --set php /usr/bin/php7.1
}

function serve-apache() {
Expand Down

0 comments on commit b70cf6d

Please sign in to comment.