Last active
January 7, 2025 13:44
-
-
Save codeinthehole/26b37efa67041e1307db 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
#!/usr/bin/env bash | |
# | |
# Bootstrap script for setting up a new OSX machine | |
# | |
# This should be idempotent so it can be run multiple times. | |
# | |
# Some apps don't have a cask and so still need to be installed by hand. These | |
# include: | |
# | |
# - Twitter (app store) | |
# - Postgres.app (http://postgresapp.com/) | |
# | |
# 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" | |
# 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 | |
# Install GNU core utilities (those that come with OS X are outdated) | |
brew tap homebrew/dupes | |
brew install coreutils | |
brew install gnu-sed --with-default-names | |
brew install gnu-tar --with-default-names | |
brew install gnu-indent --with-default-names | |
brew install gnu-which --with-default-names | |
brew install gnu-grep --with-default-names | |
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed | |
brew install findutils | |
# Install Bash 4 | |
brew install bash | |
PACKAGES=( | |
ack | |
autoconf | |
automake | |
boot2docker | |
ffmpeg | |
gettext | |
gifsicle | |
git | |
graphviz | |
hub | |
imagemagick | |
jq | |
libjpeg | |
libmemcached | |
lynx | |
markdown | |
memcached | |
mercurial | |
npm | |
pkg-config | |
postgresql | |
python | |
python3 | |
pypy | |
rabbitmq | |
rename | |
ssh-copy-id | |
terminal-notifier | |
the_silver_searcher | |
tmux | |
tree | |
vim | |
wget | |
) | |
echo "Installing packages..." | |
brew install ${PACKAGES[@]} | |
echo "Cleaning up..." | |
brew cleanup | |
echo "Installing cask..." | |
brew install homebrew/cask | |
CASKS=( | |
colluquy | |
dropbox | |
firefox | |
flux | |
google-chrome | |
google-drive | |
gpgtools | |
iterm2 | |
macvim | |
skype | |
slack | |
spectacle | |
vagrant | |
virtualbox | |
vlc | |
) | |
echo "Installing cask apps..." | |
brew cask install ${CASKS[@]} | |
echo "Installing fonts..." | |
brew tap caskroom/fonts | |
FONTS=( | |
font-inconsolidata | |
font-roboto | |
font-clear-sans | |
) | |
brew cask install ${FONTS[@]} | |
echo "Installing Python packages..." | |
PYTHON_PACKAGES=( | |
ipython | |
virtualenv | |
virtualenvwrapper | |
) | |
sudo pip install ${PYTHON_PACKAGES[@]} | |
echo "Installing Ruby gems" | |
RUBY_GEMS=( | |
bundler | |
filewatcher | |
cocoapods | |
) | |
sudo gem install ${RUBY_GEMS[@]} | |
echo "Installing global npm packages..." | |
npm install marked -g | |
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 | |
# Show filename extensions by default | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
# 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 Wiki ]] && mkdir Wiki | |
[[ ! -d Workspace ]] && mkdir Workspace | |
echo "Bootstrapping complete" |
Sorry but do I know you
On Tue, Feb 7, 2023 at 12:40 PM Samuel Torres ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
Is this still up to date?
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/26b37efa67041e1307db#gistcomment-4463315> or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJRYH77AJK2SMMUU44GPMU3WWKCKJBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVAZDAOBYGMYTAM5HORZGSZ3HMVZKMY3SMVQXIZI>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
--
Tu sei quello che permettete Nessuno è così ciechi come quelli che non
vedranno "Se qualcuno, come te, non si preoccupa di un bel po 'di tutto,
non c'è niente da fare meglio. Non è ". Dr. Seuss
Nevermind.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's definitely not. Homebrew changed the syntax for installing casks and the defaults re from an older OS version. You can look at my version that I based on this example
https://github.com/cg219/dotfiles/blob/master/setup/brew.sh