Created
January 6, 2022 10:36
-
-
Save ozmos/94097c31b99801ae0fd92198e7bea175 to your computer and use it in GitHub Desktop.
A simple fish script to change php versions in devilbox
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment