Archived
1
0
Fork 0
This repository has been archived on 2024-06-19. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/setup-osx.sh

126 lines
3.1 KiB
Bash
Raw Normal View History

2016-04-21 13:10:38 +02:00
#!/usr/bin/env bash
set -e
if ! which brew > /dev/null; then
# install brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
brew tap caskroom/cask
brew tap jlhonora/lsusb
brew update
brew upgrade
# first, replace some tools with GNU versions
2016-09-05 16:38:37 +02:00
brew install --with-default-names gnu-sed make grep gnu-indent gnu-tar
2016-04-21 13:10:38 +02:00
# install build tools
brew install --with-pcre git
brew install pkg-config python3 wget
brew install autoconf autoconf-archive automake cmake
# shell-related
brew install bash bash-completion2
brew install open-completion brew-cask-completion pip-completion
2016-04-21 13:10:38 +02:00
2016-04-23 13:33:51 +02:00
# fix qemu install
brew install glib
brew link glib
2016-04-21 13:10:38 +02:00
# dev-tools
brew install cloc lsusb truncate
brew install qemu
2016-04-21 13:10:38 +02:00
# other tools
2017-02-23 09:59:07 +01:00
brew install youtube-dl ffmpeg colordiff
2016-04-21 13:10:38 +02:00
brew install unrar p7zip unzip
brew install nmap ssh-copy-id thefuck
2016-04-21 13:10:38 +02:00
brew install tree screenfetch cowsay htop
brew install --with-functions --universal sqlite3
2017-05-31 12:24:30 +02:00
brew install --with-nghttp2 --with-libssh2 curl
2016-04-21 13:10:38 +02:00
# force-link keg-only formulas
2017-05-31 12:24:30 +02:00
brew link --force unzip sqlite curl
2016-04-21 13:10:38 +02:00
# brew cask
brew tap caskroom/versions
brew cask install iterm2-beta
brew cask install qlmarkdown quicklook-json
brew cask install blender
brew cask install wireshark
brew cask install filezilla
2016-04-28 21:57:08 +02:00
brew cask install spotify vlc
2016-04-23 12:29:40 +02:00
brew cask install google-chrome
2016-04-23 15:59:30 +02:00
brew cask install dropbox
2016-04-25 12:42:32 +02:00
brew cask install sublime-text-dev
2017-01-09 14:46:45 +01:00
brew cask install hammerspoon
2017-10-13 23:24:12 +02:00
brew cask install insomniax
brew cask install franz
2016-04-21 13:10:38 +02:00
# clean up
brew cleanup -s --force --prune=0
# update pip
2017-01-09 14:48:37 +01:00
pip3 install --upgrade setuptools
2016-04-21 13:10:38 +02:00
# make python packages from brew importable.
mkdir -p $HOME/Library/Python/2.7/lib/python/site-packages
echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> $HOME/Library/Python/2.7/lib/python/site-packages/homebrew.pth
2017-10-13 23:25:54 +02:00
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
curl -o- -L https://yarnpkg.com/install.sh | bash
nvm install node
~/.yarn/bin/yarn global add gulp
2016-04-21 13:10:38 +02:00
echo '/usr/local/bin/bash' | sudo tee -a /etc/shells
sudo chsh -s /usr/local/bin/bash $USER
2016-04-21 13:10:38 +02:00
2016-04-21 22:50:46 +02:00
if hash xcode-select > /dev/null; then
2016-04-23 16:01:40 +02:00
xcode-select --install || echo
2016-04-21 22:50:46 +02:00
fi
2017-01-09 16:40:08 +01:00
# install rustc/cargo using rustup
curl https://sh.rustup.rs -sSf | sh
2017-10-13 23:26:23 +02:00
source $HOME/.cargo/env
rustup install nightly-2016-08-01
2017-01-20 19:56:26 +01:00
rustup run nightly-2016-08-01 cargo install --git https://github.com/murarth/rusti
2017-01-09 14:48:37 +01:00
sudo pmset -a sms 0
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
2017-06-02 19:16:34 +02:00
# Automatically loads keys into ssh-agent
mkdir -p ~/.ssh
cat >> ~/.ssh/config <<EOF
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
EOF
2017-01-09 14:48:37 +01:00
2017-01-09 14:46:45 +01:00
mkdir -p ~/.hammerspoon
2016-04-21 13:10:38 +02:00
cp -va files/. $HOME/
2017-01-09 14:46:45 +01:00
cd ~/.hammerspoon
git clone https://github.com/nathancahill/anycomplete.git
git clone https://github.com/chriskempson/base16-shell.git ~/.config/base16-shell
2017-12-18 14:47:49 +01:00
git clone --recursive https://github.com/christoph-heiss/vimfiles.git ~/.vim
ln -s ~/.vim/vimrc ~/.vimrc
. ~/.bashrc
2017-12-18 14:47:49 +01:00
base16_ocean