From 66c441fb2ee6068ec65e24919eb8e49310b7a495 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 28 Jan 2018 20:56:47 -0500 Subject: [PATCH] Add dev/php --- dev/php/_init | 27 +++++++++++++++++++++++++++ dev/php/aliases.zsh | 3 +++ dev/php/env.zsh | 3 +++ 3 files changed, 33 insertions(+) create mode 100755 dev/php/_init create mode 100644 dev/php/aliases.zsh create mode 100644 dev/php/env.zsh diff --git a/dev/php/_init b/dev/php/_init new file mode 100755 index 00000000..a1bba52f --- /dev/null +++ b/dev/php/_init @@ -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 "$@" diff --git a/dev/php/aliases.zsh b/dev/php/aliases.zsh new file mode 100644 index 00000000..c438fd8a --- /dev/null +++ b/dev/php/aliases.zsh @@ -0,0 +1,3 @@ +alias phe='phpenv' +alias phr='php-boris' +alias comp='composer' diff --git a/dev/php/env.zsh b/dev/php/env.zsh new file mode 100644 index 00000000..07322eb4 --- /dev/null +++ b/dev/php/env.zsh @@ -0,0 +1,3 @@ +export PHPENV_ROOT="$XDG_DATA_HOME/phpenv" +path=( $PHPENV_ROOT/bin $PHPENV_ROOT/shims $path ) +_cache phpenv init - --no-rehash