Skip to content

Commit

Permalink
new machine requires fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arron-green committed Mar 28, 2020
1 parent d93b1db commit 973a877
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 14 deletions.
17 changes: 16 additions & 1 deletion bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ source ./common
sudo xcodebuild -license accept
xcode-select --install;

# set default shell to bash
# chsh -s /bin/bash

# bootstrap homebrew
exists-in-path brew || /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Expand All @@ -30,11 +33,18 @@ while read SCRIPT_SRC; do
fi
done < <(find $REPO_PATH/bin -type f -maxdepth 1 -mindepth 1)

# profile contains some shims
# need to do this for pyenv and nvm below
source $REPO_PATH/profile.sh

# setup python environment
./pyenv-versions

# setup node environment
./nvm-versions

# setup ruby environment
./rbenv-versions
# ./rbenv-versions

# setup vim-plug
[ -d $VIMPLUG_HOME ] || mkdir -p $VIMPLUG_HOME
Expand All @@ -45,3 +55,8 @@ vim +PlugInstall +qall
vim +PlugClean! +qall
vim +PlugUpdate +qall
vim +PlugUpgrade +qall

# install vscode extensions
if [[ -e ${REPO_PATH}/vscode.extensions ]]; then
cat ${REPO_PATH}/vscode.extensions | xargs -P4 -I{} code --install-extension {}
fi
11 changes: 4 additions & 7 deletions brew/Brewfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
cask_args appdir: '/Applications'
tap 'caskroom/cask-cask'
tap 'caskroom/cask-versions'
tap 'shopify/shopify'
tap 'graalvm/homebrew-tap'

# essentials
cask 'adoptopenjdk8'
cask 'iterm2'
brew 'git'
brew 'bash'
brew 'bash-completion'
brew 'bash-git-prompt'
cask 'google-chrome'
cask 'google-backup-and-sync'
cask 'keybase'
brew 'gpg'
Expand All @@ -31,8 +30,8 @@ brew 'nghttp2'
# cask 'java'
# cask 'adoptopenjdk8'
# https://github.com/graalvm/homebrew-tap
cask 'graalvm/tap/graalvm-ce-java11'
cask 'graalvm/tap/graalvm-ce-java8'
cask 'graalvm-ce-java11'
cask 'graalvm-ce-java8'
brew 'scala'
brew 'pyenv'
brew 'pyenv-virtualenv'
Expand Down Expand Up @@ -75,9 +74,7 @@ brew 'giter8'
brew 'zinc'
brew 'nailgun'
brew 'ammonite-repl'
brew 'apache-spark'
brew 'avro-tools'
brew 'apache-zeppelin'

# utilities
cask 'dropbox'
Expand Down
14 changes: 14 additions & 0 deletions nvm-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

BREW_NVM_HOME="$(brew --prefix)/opt/nvm"
if [[ -d ${BREW_NVM_HOME} ]]; then
NVM_DIR="${HOME}/.nvm"
mkdir -p "${NVM_DIR}"
source "${BREW_NVM_HOME}/nvm.sh"
fi

DEFAULT_VERSION=10.16.0
for VERSION in 6.11.5 ${DEFAULT_VERSION} 10.18.1; do
nvm install ${VERSION}
done
nvm alias default ${DEFAULT_VERSION}
10 changes: 5 additions & 5 deletions profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,10 @@ if [[ -d ${BREW_PREFIX}/opt/mysql-client/bin ]]; then
fi

# ruby rbenv specific
if type -p rbenv > /dev/null 2>&1; then
export PATH="${BREW_PREFIX}/opt/rbenv/bin:$PATH"
eval "$(rbenv init -)"
fi
# if type -p rbenv > /dev/null 2>&1; then
# export PATH="${BREW_PREFIX}/opt/rbenv/bin:$PATH"
# eval "$(rbenv init -)"
# fi

# python pyenv specific
if type -p pyenv > /dev/null 2>&1; then
Expand All @@ -537,4 +537,4 @@ fi
eval "$(direnv hook bash)"

ulimit -S -n 2049
export GOPATH=~/dev/go
# export GOPATH=~/dev/go
2 changes: 1 addition & 1 deletion pyenv-versions
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
for python_version in 2.7.12 2.7.14 3.6.3 3.6.5; do
for python_version in 2.7.14 3.6.5; do
CFLAGS="-I$(brew --prefix readline)/include -I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include" \
LDFLAGS="-L$(brew --prefix readline)/lib -L$(brew --prefix openssl)/lib" \
PYTHON_CONFIGURE_OPTS=--enable-unicode=ucs2 pyenv install -s $python_version
Expand Down

0 comments on commit 973a877

Please sign in to comment.