Skip to content

Commit

Permalink
update dotfiles/zsh/.env
Browse files Browse the repository at this point in the history
  • Loading branch information
zy9306 committed Oct 9, 2023
1 parent 93c9c2d commit b0735d2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions dotfiles/zsh/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# -*- mode: sh -*-

prepend_path() {
APPEND_PATH=$1
if [ -d $APPEND_PATH ]; then
if [[ $PATH != *"$APPEND_PATH"* ]]; then
export PATH=$APPEND_PATH:$PATH
fi
fi
unset APPEND_PATH
}

append_path() {
APPEND_PATH=$1
if [ -d $APPEND_PATH ]; then
if [[ $PATH != *"$APPEND_PATH"* ]]; then
export PATH=$PATH:$APPEND_PATH
fi
fi
unset APPEND_PATH
}

if [ -f ~/.my_env ]; then
source ~/.my_env
else
Expand Down Expand Up @@ -138,6 +158,9 @@ if [[ $(command_exists rbenv) == true ]]; then
eval "$(rbenv init - zsh)"
fi

# flutter
prepend_path "/opt/flutter/bin"

if [[ $(uname -s) == "Darwin" ]]; then
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib
fi

0 comments on commit b0735d2

Please sign in to comment.