Last active
February 3, 2017 18:52
-
-
Save abcdev/c7254f711652be70a32dcbe89bdf72c6 to your computer and use it in GitHub Desktop.
Jumpstarts a macOS based system. Only works when having a brewfile in the same directory.
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 | |
| echo "Lets bootstrap -> install rust, homebrew and make use of a brewfile !" | |
| command_exists () { | |
| type "$1" &> /dev/null ; | |
| } | |
| if command_exists brew; then | |
| brew update | |
| brew doctor | |
| else | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; | |
| brew doctor | |
| fi | |
| brew bundle | |
| brew cleanup | |
| brew cask cleanup | |
| if command_exists rustup; then | |
| rustup self update | |
| rustup update | |
| else | |
| curl -sSf https://static.rust-lang.org/rustup.sh | sh; | |
| fi | |
| read -p "Do you want to write RAM to disk and wipe FileVault key on sleep? Just a little slower but much more secure! [Y/n]" -n 1 -r | |
| echo # (optional) move to a new line | |
| if [[ $REPLY =~ ^[Yy]$ ]] | |
| then | |
| sudo pmset -a destroyfvkeyonstandby 1 hibernatemode 25 | |
| fi | |
| read -p "Do you want to disable the new automatic boot on power? [Y/n]" -n 1 -r | |
| echo # (optional) move to a new line | |
| if [[ $REPLY =~ ^[Yy]$ ]] | |
| then | |
| sudo nvram AutoBoot=%00 | |
| fi |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Likes being in the same directory with a brewfile like https://gist.github.com/abcdev/c1c080ab9becac0bda6e763a6f780118