diff --git a/hellotech/.config/bash/bashrc.d/hellotech.sh b/hellotech/.config/bash/bashrc.d/hellotech.sh deleted file mode 100644 index 64eab4b..0000000 --- a/hellotech/.config/bash/bashrc.d/hellotech.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash - -if command -v rbenv &> /dev/null; then - eval "$(rbenv init -)" -fi - -alias orb="cd ~/code/circleci-ci-orb" -alias core="cd ~/code/core" -alias sync-service="cd ~/code/sync-service" -alias entities="cd ~/code/entities" -alias dispatch="cd ~/code/dispatch-service" -alias infra="cd ~/code/hellotech-infra" - -#alias launch="/Users/$USER/code/hellotech-clients/launch.sh" -#htc=~/code/hellotech-clients -#alias htcstart="cd $htc;yarn run dev" -#unset htc -#ht=~/code/hellotech -#alias htstart="cd $ht;bundle exec rails s" -#alias jobstart="cd $ht;ruby script/delayed_job start" -#alias jobstop="cd $ht;ruby script/delayed_job stop" -#alias kiqstart="cd $ht;bundle exec sidekiq" -#unset ht - -#htp=~/code/hellotech-partners -#alias htpstart="cd $htp;npm start" -#unset htp - -#htapp=~/code/hellotech-tech-app -#alias htappstart="cd $htapp;react-native run-android" -#unset htapp - -#auth=~/code/hellotech-auth -#alias authstart="cd $auth;PORT=3002 bundle exec puma -C config/puma.rb" -#unset auth - -#na=~/code/tech-api -#alias nastart="cd $na;npm start" -#unset na - -#fn=~/code/ht-fn -#unset fn -#kus=~/code/ht-kustomer -#unset kus -#htt=~/code/ht-tech-tracking -#unset htt -#crawl=~/code/hellotech-crawler -#unset crawl -#scripts=~/code/hellotech-scripts -#unset scripts diff --git a/hellotech/.config/bash/env.d/hellotech-config.env b/hellotech/.config/bash/env.d/hellotech-config.env deleted file mode 100644 index b81b73c..0000000 --- a/hellotech/.config/bash/env.d/hellotech-config.env +++ /dev/null @@ -1,2 +0,0 @@ -# shellcheck disable=SC2034 - diff --git a/hellotech/.config/profile/profile.d/hellotech.sh b/hellotech/.config/profile/profile.d/hellotech.sh index 3476736..9668e91 100644 --- a/hellotech/.config/profile/profile.d/hellotech.sh +++ b/hellotech/.config/profile/profile.d/hellotech.sh @@ -4,10 +4,13 @@ _add_path () { if [ ! -d "$1" ]; then return fi + case "${PATH}" in + *"$1"*) return ;; + *) ;; + esac PATH="${PATH}:$1" } -_add_path "${HOME}/.rbenv/shims" _add_path "/usr/local/opt/mysql-client/bin" _add_path "${HOME}/google-cloud-sdk/bin" diff --git a/ruby/.config/bash/bashrc.d/rvm.sh b/ruby/.config/bash/bashrc.d/ruby.sh similarity index 61% rename from ruby/.config/bash/bashrc.d/rvm.sh rename to ruby/.config/bash/bashrc.d/ruby.sh index 8d2d727..ef79a1f 100644 --- a/ruby/.config/bash/bashrc.d/rvm.sh +++ b/ruby/.config/bash/bashrc.d/ruby.sh @@ -1,4 +1,11 @@ # shellcheck shell=bash + +if [ "${RBENV_SHELL}" = "" ]; then + if command -v rbenv >/dev/null 2>&1 ; then + eval "$(rbenv init -)" + fi +fi + if [[ -d "${HOME}/.rvm/bin" ]]; then # shellcheck disable=SC2076 if [[ ! "${PATH}" =~ "${HOME}/.rvm/bin" ]]; then diff --git a/ruby/.config/profile/profile.d/rvm.sh b/ruby/.config/profile/profile.d/ruby.sh similarity index 75% rename from ruby/.config/profile/profile.d/rvm.sh rename to ruby/.config/profile/profile.d/ruby.sh index 11c3dc1..b3b56a2 100644 --- a/ruby/.config/profile/profile.d/rvm.sh +++ b/ruby/.config/profile/profile.d/ruby.sh @@ -1,4 +1,11 @@ # shellcheck shell=sh + +if [ "${RBENV_SHELL}" = "" ]; then + if command -v rbenv >/dev/null 2>&1 ; then + eval "$(rbenv init -)" + fi +fi + if [ -d "${HOME}/.rvm/bin" ]; then case "${PATH}" in *"$HOME/.rvm/bin"*) ;; diff --git a/ruby/.config/zsh/zshrc.d/rvm.zsh b/ruby/.config/zsh/zshrc.d/ruby.zsh similarity index 53% rename from ruby/.config/zsh/zshrc.d/rvm.zsh rename to ruby/.config/zsh/zshrc.d/ruby.zsh index 3fd7bd0..5188b8e 100644 --- a/ruby/.config/zsh/zshrc.d/rvm.zsh +++ b/ruby/.config/zsh/zshrc.d/ruby.zsh @@ -1,3 +1,9 @@ +if [ "${RBENV_SHELL}" = "" ]; then + if command -v rbenv >/dev/null 2>&1 ; then + eval "$(rbenv init -)" + fi +fi + if [[ -d "${HOME}/.rvm/bin" ]]; then if [[ ! "${PATH}" =~ "${HOME}/.rvm/bin" ]]; then export PATH="$PATH:$HOME/.rvm/bin"