From 5ebdaecf9063f723c12ea5c410cd1db6ab67e193 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Mon, 20 Nov 2017 23:08:51 -0500 Subject: [PATCH] OS X setup improvements --- aliases | 8 +++++--- install.sh | 3 +++ osx/install.sh | 1 + zlogin | 6 ++++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/aliases b/aliases index c2ad69d..c63b633 100644 --- a/aliases +++ b/aliases @@ -141,9 +141,11 @@ function gitCmdWrapper { fi } -# Fix a weird mingw 'not a valid identifierline' error. -# Got the fix from https://github.com/Alexpux/MSYS2-packages/issues/735#issuecomment-328938800 -alias git="PATH=/usr/bin git" +if [[ $platform != 'Darwin' && $platform != 'Linux' ]]; then + # Fix a weird mingw 'not a valid identifierline' error. + # Got the fix from https://github.com/Alexpux/MSYS2-packages/issues/735#issuecomment-328938800 + alias git="PATH=/usr/bin git" +fi alias am='git commit --amend' alias ama='git commit --amend -C head --author' diff --git a/install.sh b/install.sh index 2c52d3b..790d838 100755 --- a/install.sh +++ b/install.sh @@ -34,6 +34,9 @@ setup_dotfile_repo() { printf "${YELLOW}Creating dotfiles symlink${NORMAL}\n" ln -s $cwd $HOME/.dotfiles fi + + # Used by various things (e.g. vim history) + mkdir -p $HOME/tmp } link_file() { diff --git a/osx/install.sh b/osx/install.sh index 18e0b90..9843454 100755 --- a/osx/install.sh +++ b/osx/install.sh @@ -35,6 +35,7 @@ printf "Installing xquartz..." brew_packages=( 'tree' 'openssl' + 'git' # 'xclip' 'rlwrap' 'cmake' diff --git a/zlogin b/zlogin index dee8256..d006bd8 100644 --- a/zlogin +++ b/zlogin @@ -3,3 +3,9 @@ if [[ -f ~/.current_path~ ]]; then cd `cat ~/.current_path~` rm ~/.current_path~ fi + +# Need to edit the path again here so that we can get the homebrew bin folder ahead of +# everything else. This is necessary because zsh is modifying the path in zshrc, and +# that causes us to run out of /usr/bin for programs that we want to use from homebrew's +# bin +path=($HOME/homebrew/opt/openssl/bin $HOME/homebrew/sbin $HOME/homebrew/bin $path)