From 1a67d89b7386d9579e6defcf51949a6cb65df139 Mon Sep 17 00:00:00 2001 From: Vianney Tran Date: Mon, 6 Jun 2016 18:32:44 -0400 Subject: [PATCH] [vm] Configure custom_rc for new VM - Change the different paths - Keep .z between recreations - Change detection of VM hostname - Alias for gocheck --- zsh/custom_rc/dogbox | 19 +++++++++++++------ zsh/muse-dd.zsh-theme | 2 +- zsh/rc | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/zsh/custom_rc/dogbox b/zsh/custom_rc/dogbox index c32e9f1..190bcb4 100644 --- a/zsh/custom_rc/dogbox +++ b/zsh/custom_rc/dogbox @@ -1,10 +1,17 @@ export VIRTUAL_ENV_DISABLE_PROMPT=1 -source $HOME/dogweb/python/bin/activate && cd $HOME/workspace/dogweb -export GOPATH=$HOME/workspace/go +source $HOME/python/bin/activate && cd $HOME/dogweb +export GOPATH=$HOME/go export GOBIN=$GOPATH/bin -export NODEPATH=$HOME/workspace/dogweb/node_modules -export PATH=$PATH:$NODEPATH/.bin/:$GOBIN +export NODEPATH=$HOME/dogweb/node_modules +export PATH=~/bin:$GOBIN:$PATH:$NODEPATH/.bin/ + +export _Z_DATA=$HOME/.user-config/.z export DD_ENV=dev -export DOGWEB_DEFAULT_CONFIG_PATH=$HOME/workspace/dogweb/development.ini -export KAFKA_SHARDING_DEFAULT_CONFIG_PATH=/home/vagrant/workspace/dogweb/etc/conf.d/kafka_sharding.toml +export DOGWEB_DEFAULT_CONFIG_PATH=$HOME/dogweb/development.ini +export KAFKA_SHARDING_DEFAULT_CONFIG_PATH=/home/vagrant/dogweb/etc/conf.d/kafka_sharding.toml + +eval "$(gimme 1.4.2)" + +# Aliases +alias gocheck="go fmt ./... && go tool vet -assign -shadow -bool -atomic -buildtags -composites -methods -printf -structtags -shift -unreachable -unsafeptr -rangeloops . && golint" diff --git a/zsh/muse-dd.zsh-theme b/zsh/muse-dd.zsh-theme index e8ad477..c182431 100644 --- a/zsh/muse-dd.zsh-theme +++ b/zsh/muse-dd.zsh-theme @@ -40,7 +40,7 @@ function get_hostname() { if [[ $envname == *"No such file"* ]] || [[ $envname == "dev" ]] then - if [[ $host == "dogbox-"* ]] + if [[ $host == "ubuntu-1204" ]] then echo "%{$C_YELLOW%}""vm""%{$C_RESET%}"; return; diff --git a/zsh/rc b/zsh/rc index e395926..b26b8e4 100644 --- a/zsh/rc +++ b/zsh/rc @@ -16,7 +16,7 @@ source ~/.jumpbox-tools/zsh/helpers source $ZSH/oh-my-zsh.sh # Special RC -if [[ $(hostname) == "dogbox-"* ]] +if [[ $(hostname) == "ubuntu-1204" ]] then source ~/.jumpbox-tools/zsh/custom_rc/dogbox fi