Skip to content

Commit

Permalink
switches from rvm to chruby+ruby-install
Browse files Browse the repository at this point in the history
  • Loading branch information
tisba committed Jul 29, 2023
1 parent bde8067 commit fb15f6d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
4 changes: 3 additions & 1 deletion etc/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,6 @@ fi
unsetopt share_history

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
# export PATH="$PATH:$HOME/.rvm/bin"
source $(brew --prefix chruby)/share/chruby/chruby.sh
source $(brew --prefix chruby)/share/chruby/auto.sh
26 changes: 24 additions & 2 deletions utils/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,34 @@ brew analytics off
export ZSH="$DOTFILES/oh-my-zsh"
/bin/bash -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# Get RVM installed.
curl -sSL https://get.rvm.io | bash -s stable
# Ruby \o/
# Install chruby, ruby-install and install ruby version defined
# in $DOTFILES/etc/ruby-version.
brew install chruby ruby-install
ruby-install ruby $(cat "$DOTFILES/etc/ruby-version") -- --disable-install-rdoc --with-openssl-dir=$(brew --prefix openssl@1.1)

mkdir -p ~/.aws/

# misc
touch ~/.hushlogin

# FIXME: This will require "Full Disk Access privileges" :(
# TODO: Add tmutil isexcluded checks for each path
# NOTES:
# * to read excluded paths, shown in the UI, you can use:
# defaults read /Library/Preferences/com.apple.TimeMachine SkipPaths
# or defaults read /Library/Preferences/com.apple.TimeMachine SkipPaths | plutil -convert json -o - - | jq .
# * there is also an attribute that excludes items from TimeMachine, you can use this
# to find them:
# sudo mdfind "com_apple_backup_excludeItem = 'com.apple.backupd'"
sudo tmutil addexclusion -p "$(brew --prefix)"

sudo tmutil addexclusion -p ~/.rvm
sudo tmutil addexclusion -p ~/.rubies
sudo tmutil addexclusion -p ~/.gem

sudo tmutil addexclusion -p ~/.orbstack
sudo tmutil addexclusion -p ~/.tart
sudo tmutil addexclusion -p ~/Library/Containers/com.docker.docker

"$DOTFILES"/utils/bootstrap-link
2 changes: 2 additions & 0 deletions utils/bootstrap-link
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ set -e
exit 1
}

ln -nfs "$DOTFILES/etc/ruby-version" ~/.ruby-version

ln -nfs "$DOTFILES/etc/zshrc" ~/.zshrc

ln -nfs "$DOTFILES/etc/ssh-config" ~/.ssh/config
Expand Down

0 comments on commit fb15f6d

Please sign in to comment.