File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 86
86
}
87
87
}
88
88
89
+ phpvm_detect_profile () {
90
+ if [ " ${PROFILE-} " = ' /dev/null' ]; then
91
+ return
92
+ fi
93
+
94
+ if [ -n " ${PROFILE} " ] && [ -f " ${PROFILE} " ]; then
95
+ phpvm_echo " ${PROFILE} "
96
+ return
97
+ fi
98
+
99
+ local SHELL_TYPE
100
+ SHELL_TYPE=" $( basename " $SHELL " ) "
101
+
102
+ if [ " $SHELL_TYPE " = " bash" ]; then
103
+ if [ -f " $HOME /.bashrc" ]; then
104
+ phpvm_echo " $HOME /.bashrc"
105
+ elif [ -f " $HOME /.bash_profile" ]; then
106
+ phpvm_echo " $HOME /.bash_profile"
107
+ fi
108
+ elif [ " $SHELL_TYPE " = " zsh" ]; then
109
+ if [ -f " $HOME /.zshrc" ]; then
110
+ phpvm_echo " $HOME /.zshrc"
111
+ elif [ -f " $HOME /.zprofile" ]; then
112
+ phpvm_echo " $HOME /.zprofile"
113
+ fi
114
+ fi
115
+ }
116
+
89
117
inject_phpvm_config () {
90
118
local PHPVM_PROFILE
91
119
PHPVM_PROFILE=" $( phpvm_detect_profile) "
You can’t perform that action at this time.
0 commit comments