Skip to content

Instantly share code, notes, and snippets.

@YiqinZhao
Created December 31, 2017 01:18
Show Gist options
  • Save YiqinZhao/2416ef5bb25fda8f3f211fc758c0b340 to your computer and use it in GitHub Desktop.
Save YiqinZhao/2416ef5bb25fda8f3f211fc758c0b340 to your computer and use it in GitHub Desktop.
macOS restoring tool.
#!/bin/zsh
echo "========================================"
echo " macOS restoring script"
echo " Copyright Hawkins Zhao 2017"
echo "========================================"
echo "---> Restoring Applications..."
cp ./Apps/* /Applications/
echo "---> Installing Homebrew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "---> Installing Homebrew packages..."
brew install wget you-get
brew cask install java iina
echo "---> Installing oh-my-zsh..."
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo "---> Tweaking ruby..."
gem source -a https://gems.ruby-china.org
echo "---> Installing Cocoapods"
sudo gem install cocoapods
echo "---> Installing Node.js"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
nvm install node
echo "---> Congratulation! All items restored successful!"
echo "You may still want to install this tools manually: Anacodna"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment