Add dev/php
This commit is contained in:
parent
f3a93081e9
commit
66c441fb2e
27
dev/php/_init
Executable file
27
dev/php/_init
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env zsh
|
||||
source ${0:A:h}/../../deploy
|
||||
source env.zsh
|
||||
|
||||
install() {
|
||||
_ensure_repo madumlao/phpenv $PHPENV_ROOT
|
||||
_ensure_repo php-build/php-build $PHPENV_ROOT/plugins/php-build
|
||||
case $(_os) in
|
||||
arch) pacaur --needed --noconfirm --noedit -S libmcrypt tidy ;;
|
||||
macos) brew install libmcrypt tidy-html5 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
update() {
|
||||
if [[ -n $PHPENV_ROOT ]]; then
|
||||
cd $PHPENV_ROOT && git pull
|
||||
for ver in $PHPENV_ROOT/plugins/*(/N); do
|
||||
cd $ver && git pull
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# link() { }
|
||||
|
||||
# clean() { }
|
||||
|
||||
init "$@"
|
3
dev/php/aliases.zsh
Normal file
3
dev/php/aliases.zsh
Normal file
|
@ -0,0 +1,3 @@
|
|||
alias phe='phpenv'
|
||||
alias phr='php-boris'
|
||||
alias comp='composer'
|
3
dev/php/env.zsh
Normal file
3
dev/php/env.zsh
Normal file
|
@ -0,0 +1,3 @@
|
|||
export PHPENV_ROOT="$XDG_DATA_HOME/phpenv"
|
||||
path=( $PHPENV_ROOT/bin $PHPENV_ROOT/shims $path )
|
||||
_cache phpenv init - --no-rehash
|
Loading…
Reference in a new issue