1
0
mirror of https://github.com/kremalicious/dotfiles.git synced 2024-11-22 01:37:14 +01:00

stuff 'n' stuff

This commit is contained in:
Matthias Kretschmann 2015-01-13 16:37:58 +01:00
parent bf64dcb67e
commit af88968f7f
3 changed files with 39 additions and 9 deletions

View File

@ -10,6 +10,7 @@ brew update
brew upgrade brew upgrade
# Install what we need # Install what we need
brew install coreutils
brew install bash brew install bash
brew install bash-completion brew install bash-completion
brew install git brew install git

43
paths
View File

@ -1,12 +1,41 @@
[ -d "$HOME/.bin" ] && PATH="$HOME/.bin:$PATH" # adapted based on https://github.com/necolas/dotfiles/blob/master/shell/bash_paths
ANDROID_HOME="/usr/local/opt/android-sdk" # Directories to be prepended to PATH
[ -d "$ANDROID_HOME" ] && PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools" declare -a dirs_to_prepend=(
"/usr/local/sbin"
"/usr/local/bin" # Ensure that this bin always takes precedence over `/usr/bin`
)
[ -d "/usr/local/mysql/bin" ] && PATH="/usr/local/mysql/bin:$PATH" # Directories to be appended to PATH
[ -d "/usr/local/share/npm/bin" ] && PATH="/usr/local/share/npm/bin:$PATH" declare -a dirs_to_append=(
"/usr/bin"
"$HOME/.bin"
"$HOME/.rvm/bin"
"$(brew --prefix coreutils)/libexec/gnubin" # Add brew-installed GNU core utilities bin
"$(brew --prefix)/share/npm/bin" # Add npm-installed package bin
"$(brew --prefix android-sdk)/tools"
"$(brew --prefix android-sdk)/platform-tools"
"$(brew --prefix mysql)/bin"
)
[ -d "$HOME/.rvm/bin" ] && PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting # Prepend directories to PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* for index in ${!dirs_to_prepend[*]}
do
if [ -d ${dirs_to_prepend[$index]} ]; then
# If these directories exist, then prepend them to existing PATH
PATH="${dirs_to_prepend[$index]}:$PATH"
fi
done
# Append directories to PATH
for index in ${!dirs_to_append[*]}
do
if [ -d ${dirs_to_append[$index]} ]; then
# If these bins exist, then append them to existing PATH
PATH="$PATH:${dirs_to_append[$index]}"
fi
done
unset dirs_to_prepend dirs_to_append
export PATH export PATH

View File

@ -7,8 +7,8 @@ curl -sSL https://get.rvm.io | bash
rvm requirements rvm requirements
# Install a Ruby # Install a Ruby
rvm install 2.1.4 rvm install 2.2.0
rvm use --default 2.1.4 rvm use --default 2.2.0
rvm rubygems latest rvm rubygems latest
# Install gems # Install gems