Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

change php version devilbox

function switch_php
    set input_file ~/devilbox/.env
    if grep 'PHP_SERVER='$argv $input_file
        sed -i 's/^PHP_SERVER/#PHP_SERVER/' $input_file
        sed -i 's/^#PHP_SERVER='$argv'/PHP_SERVER='$argv'/' $input_file
        grep '^PHP_SERVER*' $input_file
    else
        echo "There is no container for PHP " $argv
    end
end
Source by gist.github.com #
 
PREVIOUS NEXT
Tagged: #change #php #version #devilbox
ADD COMMENT
Topic
Name
4+3 =