Last active
August 11, 2018 16:37
-
-
Save musaprg/51414082778ce2f47102974df29e63f2 to your computer and use it in GitHub Desktop.
環境構築(Mac) #deprecated go to musaprg/dotfiles https://github.com/musaprg/dotfiles
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/sh | |
DOTFILESDIR=`readlink -f .` | |
# Move all dotfiles here (before all intstructions begin) | |
ln -snfv ${DOTFILESDIR}/.vimrc $HOME/.vimrc | |
ln -snfv ${DOTFILESDIR}/.vim $HOME/.vim | |
# For macOS El Capitan or later version users | |
# You need to disable SIP security option. | |
# For disable it, please boot your mac with Recovery Mode (power on your mac with pressing ⌘+R) | |
# Open and type these command in your terminal and Enter. | |
# ``` | |
# csrutil disable | |
# reboot | |
# ``` | |
# Install Xcode CLI tools | |
xcode-select --install | |
sudo xcodebuild -license | |
# Install homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
############ GNU Commands ################### | |
brew install xz | |
brew install coreutils | |
############ zsh ############### | |
# Install zsh | |
brew install zsh # install latest version via brew | |
echo "/usr/local/bin/zsh" | sudo tee -a /etc/shells # add zsh installed via homebrew to /etc/shells | |
chsh -s /usr/local/bin/zsh # change login shells to zsh | |
# Install prezto | |
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto" | |
# Install powerline fonts | |
git clone https://github.com/powerline/fonts.git /tmp/powerline_fonts | |
sh /tmp/powerline_fonts/install.sh | |
# Move settings after setting up prezto | |
rm -f ${ZDOTDIR:-$HOME}/.zprezto/runcoms/z* | |
ls ${DOTFILESDIR}/zshconfig/ | xargs -I{} ln -s ${DOTFILESDIR}/zshconfig/{} ${ZDOTDIR:-$HOME}/.zprezto/runcoms/{} | |
############ NeoVim ############## | |
# Install NeoVim | |
brew install neovim/neovim/neovim | |
mkdir -p ~/.config/nvim/ | |
ln -snfv ~/.vim ~/.config/nvim/ | |
ln -snfv ~/.vimrc ~/.config/nvim/init.vim | |
############ Global .gitignore ############## | |
git clone https://github.com/github/gitignore.git /tmp/gitignore | |
PATH_TO_GITIGNORE=/tmp/gitignore/Global | |
ls $PATH_TO_GITIGNORE | grep gitignore | xargs -I{} cat $PATH_TO_GITIGNORE/{} > .gitignore_global | |
git config --global core.excludesfile ~/.gitignore_global | |
############ rbenv ############### | |
# rbenv | |
brew install rbenv | |
############ Python ############### | |
# pipenv | |
brew install pipenv | |
############ gcc ################### | |
# install latest gcc | |
brew install gcc | |
# override macosx dirty configuration with homebrew gcc | |
sudo ln -sf /usr/local/bin/`ls /usr/local/bin | grep -E '^gcc-[0-9]'` /usr/bin/gcc | |
sudo ln -sf /usr/local/bin/`ls /usr/local/bin | grep -E '^g\+\+-[0-9]'` /usr/bin/g++ |
gitignore_globalをgithubのリポジトリのGlobalに入ってるやつから自動生成するようにした
gccとg++を入れるようにした
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
zshrc 参考: https://gist.github.com/mollifier/4979906