-
-
Save the-jedi-droid/64f22cf5d5c38fe67f6225db2deb6c1a to your computer and use it in GitHub Desktop.
Script to install stuff I want on a new OSX machine
This file contains 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 | |
# | |
# Bootstrap script for setting up a new OSX machine | |
# | |
# This should be idempotent so it can be run multiple times. | |
# | |
# Notes: | |
# | |
# - If installing full Xcode, it's better to install that first from the app | |
# store before running the bootstrap script. Otherwise, Homebrew can't access | |
# the Xcode libraries as the agreement hasn't been accepted yet. | |
# | |
# | |
# | |
# Reading: | |
# | |
# - http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac | |
# - https://gist.github.com/MatthewMueller/e22d9840f9ea2fee4716 | |
# - https://news.ycombinator.com/item?id=8402079 | |
# - http://notes.jerzygangi.com/the-best-pgp-tutorial-for-mac-os-x-ever/ | |
echo "Starting bootstrapping" | |
pushd . | |
cd | |
if [ ! -f .bash_profile ]; then | |
echo "Configure bash profile" | |
curl -O https://gist.githubusercontent.com/Nimrodda/859452a60975031a21f1/raw/b77b985a86accbe57fa1feca8679b26ee1a257db/.bash_profile | |
fi | |
# Check for Homebrew, install if we don't have it | |
if test ! $(which brew); then | |
echo "Installing homebrew..." | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
# Update homebrew recipes | |
brew update | |
brew upgrade | |
PACKAGES=( | |
coreutils | |
ack | |
imagemagick | |
python | |
rename | |
tree | |
apktool | |
dex2jar | |
md5sha1sum | |
p7zip | |
youtube-dl | |
openssl | |
telnet | |
transmission | |
git-flow | |
mackup | |
) | |
echo "Installing packages..." | |
brew install ${PACKAGES[@]} | |
echo "Cleaning up..." | |
brew cleanup | |
echo "Installing cask..." | |
brew tap caskroom/cask | |
brew tap caskroom/versions | |
CASKS=( | |
google-backup-and-sync | |
google-chrome | |
skype | |
slack | |
java8 | |
android-sdk | |
android-studio | |
flux | |
visual-studio-code | |
postman | |
charles | |
cyberduck | |
ssh-tunnel-manager | |
dashlane | |
zoomus | |
sourcetree | |
iterm2 | |
) | |
echo "Installing cask apps..." | |
brew cask install ${CASKS[@]} | |
echo "Configuring OSX..." | |
# Set fast key repeat rate | |
defaults write NSGlobalDomain KeyRepeat -int 0 | |
# Require password as soon as screensaver or sleep mode starts | |
#defaults write com.apple.screensaver askForPassword -int 1 | |
#defaults write com.apple.screensaver askForPasswordDelay -int 0 | |
# Enable tap-to-click | |
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true | |
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 | |
# Disable "natural" scroll | |
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false | |
echo "Creating folder structure..." | |
[[ ! -d Workspace ]] && mkdir Workspace | |
echo "DON'T FORGET TO ADD PATHs mentioned in the script TO ZSHRC after installation of ZSH!!" | |
# echo 'export JAVA_HOME=$(/usr/libexec/java_home)' >> ~/.zshrc | |
# echo 'export ANDROID_SDK_ROOT="~/Library/Android/sdk"' >> ~/.zshrc | |
# echo 'export PATH=$PATH:~/Library/Android/sdk/platform-tools/' >> ~/.bash_profile | |
# echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/. zshrc | |
# echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/. zshrc | |
echo "Bootstrapping complete" | |
echo "Installing oh my zsh" | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
popd |
vysor
flutter
dart ?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To do:
-Git
-Dashlane
-Zoomus
-Sourcetree
-Iterm
-Oh my zsh
-mackup