Skip to content

Commit

Permalink
More output during installation
Browse files Browse the repository at this point in the history
  • Loading branch information
kigster committed Dec 2, 2024
1 parent 70920e9 commit 096defa
Showing 1 changed file with 32 additions and 14 deletions.
46 changes: 32 additions & 14 deletions bin/install-dev-tooling
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
# shellcheck disable=SC1091,SC2002,SC2207
# vim: ft=bash

if [[ $(uname -s) != "Darwin" ]]; then
echo -e "\e[31;1mERROR: This script is only supported on OS-X.\e[0m"
exit 1
fi

echo "Please wait while we install BASH dependencies..."

export BASHMATIC_HOME="${BASHMATIC_HOME:-"${HOME}/.bashmatic"}"
[[ -z ${BASHMATIC_HOME} ]] && export BASHMATIC_HOME="${HOME}/.bashmatic"
[[ -d ${BASHMATIC_HOME} ]] || bash -c "$(curl -fsSL https://bashmatic.re1.re); bashmatic-install -q"
Expand All @@ -19,7 +26,7 @@ output.constrain-screen-width 100
declare -g timestamp
export timestamp="$(time.now.db)"

h1 "Installing Brew Packages..."
h3bg "Installing Brew Packages..."
run.set-all continue-on-error
run "brew bundle --no-upgrade --no-lock"
run.set-all abort-on-error
Expand All @@ -29,28 +36,39 @@ if [[ -d ~/.vim && -f ~/.vimrc ]]; then
run "cp -p -v ~/.vimrc ~/.vimrc.${timestamp}"
fi

h1 "Installing custom vim configuration locally..."
h3bg "Installing custom vim configuration locally..."
run "cp -f development/config/.vimrc ${HOME}"
run "cp -f development/config/.vimrc.customizations ${HOME}"

h1 "Installing VIM Plugins... Please wait."
h3bg "Installing VIM Plugins... Please wait."
run.set-next show-output-on
run "vim -E +PlugInstall +qall"

h1 "Installing ~/.psqlrc"
h3bg "Installing ~/.psqlrc"
run "mv ~/.psqlrc ~/.psqlrc.${timestamp}"
run.set-next show-output-on
run "cp -p -v development/config/.psqlrc* ${HOME}"

h1 "Installing Ruby"
run "brew update && brew install rbenv ruby-build"
run "brew install jemalloc rust"
h2 "Building Ruby... with Jemalloc & YJIT"
export ruby_version="$(cat .ruby-version | tr -d '\n')"

run.set-all abort-on-error
if [[ -z $(rbenv versions | grep "${ruby_version}") ]]; then
h3bg "Installing Ruby"

run "brew update && brew install rbenv ruby-build"
run "brew install jemalloc rust"
h2 "Building Ruby... with Jemalloc & YJIT"

run.set-all abort-on-error

unset CFLAGS
export RUBY_CFLAGS="-Wno-error=implicit-function-declaration"
run.set-next show-output-on
run "RUBY_CONFIGURE_OPTS='--enable-yjit --with-jemalloc' rbenv install -f ${ruby_version}"
else
rbenv local "${ruby_version}"
success "Ruby ${ruby_version} was already installed."
fi

run.set-next abort-on-error
[[ -f Gemfile ]] && run "bundle install -j 4"

unset CFLAGS
export RUBY_CFLAGS="-Wno-error=implicit-function-declaration"
run.set-next show-output-on
run "RUBY_CONFIGURE_OPTS='--enable-yjit --with-jemalloc' rbenv install -f $(cat .ruby-version | tr -d '\n')"
run "bundle install -j 4"

0 comments on commit 096defa

Please sign in to comment.