Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bash/.bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
# ~/.bash_profile
#

[[ -f ~/.profile ]] && . ~/.profile
[[ -f ~/.bashrc ]] && . ~/.bashrc
11 changes: 10 additions & 1 deletion bash/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,13 @@ type -P cdl.sh &>/dev/null && source cdl.sh # this is also like an alias
#-----------------------------------------------------------------------

# opencode
export PATH=/home/deyloop/.opencode/bin:$PATH
if type path_prefix >/dev/null 2>&1; then
path_prefix "$HOME/.opencode/bin"
else
case ":${PATH}:" in
*:"$HOME/.opencode/bin":*) ;;
*)
[ -d "$HOME/.opencode/bin" ] && export PATH="$HOME/.opencode/bin:$PATH"
;;
esac
fi
36 changes: 30 additions & 6 deletions bash/.profile
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,38 @@ export REPOS_DIR="$HOME/repos"

#----------------------------------PATH---------------------------------

PATH="$CARGO_HOME:$PATH"
PATH="$SCRIPTS_DIR:$PATH"
PATH="$HOME/.local/bin:$PATH"
PATH="$PATH:$HOME/.local/go/bin"
# Prepend directories to PATH, skipping any that are already present or missing.
path_prefix() {
_path_prefix_dir=
for _path_prefix_dir in "$@"; do
[ -d "$_path_prefix_dir" ] || continue
case ":${PATH}:" in
*:"${_path_prefix_dir}":*) ;;
*) PATH="${_path_prefix_dir}:${PATH}" ;;
esac
done
export PATH
unset _path_prefix_dir
}

# Append directories to PATH, skipping any that are already present or missing.
path_postfix() {
_path_postfix_dir=
for _path_postfix_dir in "$@"; do
[ -d "$_path_postfix_dir" ] || continue
case ":${PATH}:" in
*:"${_path_postfix_dir}":*) ;;
*) PATH="${PATH}:${_path_postfix_dir}" ;;
esac
done
export PATH
unset _path_postfix_dir
}

path_prefix "$CARGO_HOME" "$SCRIPTS_DIR" "$HOME/.local/bin"

export GOPATH="$HOME/.local/go/packages"
PATH="$PATH:$GOPATH/bin"
export PATH
path_postfix "$HOME/.local/go/bin" "$GOPATH/bin"


#-----------------------------------------------------------------------