Created
February 6, 2021 01:40
-
-
Save SippieCup/00fd6f48cf726b43efce16a1c3a9726a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ -f $(which xcode-select) ]; then | |
| xcode-select --install | |
| fi | |
| if [ -f $(which brew) ]; then | |
| echo "install homebrew first!" | |
| echo '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"' | |
| exit 1 | |
| fi | |
| brew install rbenv | |
| rbenv init | |
| curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash | |
| if [$? -eq 0]; then | |
| rbenv install 2.7.2 | |
| rbenv global 2.7.2 | |
| ruby -v | |
| if [$? -eq 0]; then | |
| gem install --user-install bundler jekyll | |
| if [ $SHELL = $(which zsh) ]; then | |
| echo 'export PATH="$HOME/.gem/ruby/X.X.0/bin:$PATH"' >> ~/.zshrc | |
| source .zshrc | |
| else | |
| echo 'export PATH="$HOME/.gem/ruby/X.X.0/bin:$PATH"' >> ~/.bash_profile | |
| source ~/.bash_profile | |
| fi | |
| sudo gem install bundler | |
| sudo gem install -n /usr/local/bin/ jekyll | |
| sudo gem install bundler jekyll | |
| fi | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment