aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.macos2
-rwxr-xr-x.path9
-rw-r--r--.zshrc9
-rwxr-xr-xbootstrap.sh2
4 files changed, 13 insertions, 9 deletions
diff --git a/.macos b/.macos
index 3d556f3..2b8e495 100644
--- a/.macos
+++ b/.macos
@@ -2,3 +2,5 @@
export BROWSER='open -a safari'
[ -d /Applications/Firefox.app ] && export BROWSER='open -a firefox'
+
+alias bug='brew upgrade --greedy'
diff --git a/.path b/.path
new file mode 100755
index 0000000..b2e4d7d
--- /dev/null
+++ b/.path
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+[ -d $HOME/bin ] && export PATH=$PATH:$HOME/bin
+
+if command -v go &> /dev/null
+then
+ export GOPATH=$(go env GOPATH)
+ export PATH=$PATH:$(go env GOPATH)/bin
+fi
diff --git a/.zshrc b/.zshrc
index fa00dc3..0d02729 100644
--- a/.zshrc
+++ b/.zshrc
@@ -18,7 +18,7 @@ HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.zsh_history
-[ -d ~/bin ] && export PATH="$HOME/bin:$PATH"
+source $HOME/.path
[[ -s /etc/profile.d/autojump.sh ]] && source /etc/profile.d/autojump.sh
@@ -28,16 +28,9 @@ Darwin)
# commands for macOS
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
- # ruby
- [ -d /usr/local/opt/ruby/bin ] && export PATH="/usr/local/opt/ruby/bin:$PATH"
-
- # java
- [ -d /usr/local/opt/openjdk/bin ] && export PATH="/usr/local/opt/openjdk/bin:$PATH"
-
# Alias
alias ls='ls -G'
alias ll='ls -lhG'
- alias bug='brew upgrade --greedy'
source ~/.macos
;;
diff --git a/bootstrap.sh b/bootstrap.sh
index 3d44bee..de9726d 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -19,7 +19,7 @@ remove_and_link () {
link_all () {
remove_and_link .ctags.d .mutt bin .aliases .macos \
.mbsyncrc .msmtprc .tmux.conf .urlview .zshrc \
- .vimrc .vim
+ .vimrc .vim .path
}
main () {